From b8a14d96c06d5a8910cb28d28870f0036ae6a461 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Sat, 24 Aug 2013 19:44:19 +0200 Subject: The extension::initialize() and extension::finalize() methods are called at the appropriate time --- tests/simple/simple.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'tests/simple/simple.cpp') diff --git a/tests/simple/simple.cpp b/tests/simple/simple.cpp index 36db294..fbfcbf8 100644 --- a/tests/simple/simple.cpp +++ b/tests/simple/simple.cpp @@ -7,6 +7,12 @@ * @copyright 2013 Copernica BV */ #include +#include + +/** + * Namespace to use + */ +using namespace std; /** * Override the extension class @@ -17,19 +23,23 @@ public: /** * Constructor */ - SimpleExtension() : Extension( - "simple", - "1.0", - "Emiel Bruijntjes ", - "http://www.copernica.com", - "Copyright 2013 Copernica BV") + SimpleExtension() : Extension("simple", "1.0") + { + } + + virtual bool initialize() { + cout << "initialize" << endl; + return true; } + + virtual bool finalize() + { + cout << "finalize" << endl; + return true; + } + }; -extern "C" { - // create the object for the PHP extension PHP_CPP_EXTENSION(SimpleExtension); - -} -- cgit v1.2.3