Repository navigation
Expand file tree
/
Copy pathPHPEventHandler.h
More file actions
85 lines (67 loc) · 1.71 KB
/
Copy pathPHPEventHandler.h
File metadata and controls
85 lines (67 loc) · 1.71 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef _PHP_EVENT_HANDLER_H
#define _PHP_EVENT_HANDLER_H 1
#include <php_stl.h>
#include "php_compat_fix.h"
#include "../DispatchModule.h"
#include "../../core/EventQueue.h"
#include "../../core/eventfilter/EventFilter.h"
#include "../../core/eventfilter/EventFilterHelper.h"
#include "PHPEmbedModule.h"
using namespace dispatch::config;
using namespace dispatch::core::eventfilter;
namespace dispatch {
namespace module {
namespace phpembed {
class PHPEventHandlerDeclaration {
public:
string handler_function;
string handler_class;
string handler_method;
vector<string> load_files;
};
/**
* Single instans event-handler for kjøring av PHP
*/
class PHPEventHandler : public EventHandler {
PHPEmbedModule* module;
/**
* PHPEmbed handle
*/
// php_stl php_handler;
PHPEventHandlerDeclaration handler_decl;
/**
* Navn på funksjonen som skal kjøres. Gjelder også med klasse::metode kall. (da inneholder denne navnet på en wrapper-funksjon som så kaller statisk inn i klassen)
*/
// string handler_function;
void initializePHPContext(php_stl* h);
/**
* Filtrer eventer med dette filteret
*/
EventFilter* filter;
void _innerHandleEvent(map<string, string>&parms);
// void _forkHandler();
public:
// PHPEventHandler(PHPEventModule* mod);
/**
* Tar en konfig-node som inneholder konfigurasjonen for hvordan denne skal oppføre seg
*/
PHPEventHandler(PHPEmbedModule*, GConfigNode* config);
/**
* Destructor
*/
virtual ~PHPEventHandler();
/**
* Er alt iorden
*/
bool isValid();
/**
* Håndter en event (EventHandler-interfacet)
*/
void handleEvent(dispatch::Event* e);
/**
* Cleanup before shutdown
*/
void cleanup();
};
}}}
#endif