blob: fbfcbf869bd16620bd8c3b8e8489dbd980d8934b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/**
* Simple.h
*
* A very simple extension that does almost nothing
*
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2013 Copernica BV
*/
#include <phpcpp.h>
#include <iostream>
/**
* Namespace to use
*/
using namespace std;
/**
* Override the extension class
*/
class SimpleExtension : public PhpCpp::Extension
{
public:
/**
* Constructor
*/
SimpleExtension() : Extension("simple", "1.0")
{
}
virtual bool initialize()
{
cout << "initialize" << endl;
return true;
}
virtual bool finalize()
{
cout << "finalize" << endl;
return true;
}
};
// create the object for the PHP extension
PHP_CPP_EXTENSION(SimpleExtension);
|