summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-31 08:09:51 -0700
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-31 08:09:51 -0700
commit708e9cf9da9571a38ac8d2529d016cd78ce8ec54 (patch)
treedaa1bd156b2eaa7259f5b29753a94e879b54710d /tests
parentc2343400688366e567f67e89a50d573786f98bec (diff)
{auto} work in progress
Diffstat (limited to 'tests')
-rw-r--r--tests/simple/simple.cpp62
1 files changed, 1 insertions, 61 deletions
diff --git a/tests/simple/simple.cpp b/tests/simple/simple.cpp
index db314ca..761c7a0 100644
--- a/tests/simple/simple.cpp
+++ b/tests/simple/simple.cpp
@@ -15,66 +15,6 @@
*/
using namespace std;
-/**
- * Override the request class
- */
-class SimpleRequest : public PhpCpp::Request
-{
-public:
- SimpleRequest(PhpCpp::Extension *extension) : PhpCpp::Request(extension)
- {
- }
-
- virtual bool initialize()
- {
- cout << "Request::initialize" << endl;
- return true;
- }
-
- virtual bool finalize()
- {
- cout << "Request::finalize" << endl;
- return true;
- }
-};
-
-/**
- * Override the extension class
- */
-class SimpleExtension : public PhpCpp::Extension
-{
-public:
- /**
- * Constructor
- */
- SimpleExtension() : Extension("simple", "1.0", {
- PhpCpp::Function("hallo", {
- PhpCpp::Argument("arg1", true)
- })
- })
- {
- }
-
- virtual bool initialize()
- {
- cout << "Extension::initialize" << endl;
- return true;
- }
-
- virtual bool finalize()
- {
- cout << "Extension::finalize" << endl;
- return true;
- }
-
- virtual PhpCpp::Request *request()
- {
- return new SimpleRequest(this);
- }
-};
-
-
-
// create the object for the PHP extension
-PHP_CPP_EXTENSION(SimpleExtension);
+PHP_CPP_EXTENSION(Extension("simple","1.0"));