diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-08-24 19:44:19 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-08-24 19:44:19 +0200 |
commit | b8a14d96c06d5a8910cb28d28870f0036ae6a461 (patch) | |
tree | 5077e7af0a04ce093dded091747c047b1ad05478 /tests/simple/simple.cpp | |
parent | d29c1a960798bbfa351b1aa3426d6f0a79ffe92c (diff) |
The extension::initialize() and extension::finalize() methods are called at the appropriate time
Diffstat (limited to 'tests/simple/simple.cpp')
-rw-r--r-- | tests/simple/simple.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
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 <phpcpp.h> +#include <iostream> + +/** + * Namespace to use + */ +using namespace std; /** * Override the extension class @@ -17,19 +23,23 @@ public: /** * Constructor */ - SimpleExtension() : Extension( - "simple", - "1.0", - "Emiel Bruijntjes <emiel.bruijntjes@copernica.com>", - "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); - -} |