-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathphp_function.h
More file actions
63 lines (54 loc) · 1.04 KB
/
php_function.h
File metadata and controls
63 lines (54 loc) · 1.04 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
/**
* PhpFunction.h
*
* Class that wraps around an ecmascript function and makes it available to PHP
* userspace.
*
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2025 Copernica B.V.
*/
/**
* Include guard
*/
#pragma once
/**
* Dependencies
*/
#include "php_base.h"
/**
* Start namespace
*/
namespace JS {
/**
* Class definition
*/
class PhpFunction : public PhpBase
{
public:
/**
* Constructor
* @param isolate The isolate
* @param object The ecmascript object
*/
PhpFunction(v8::Isolate *isolate, const v8::Local<v8::Function> &object) :
PhpBase(isolate, object) {}
/**
* No copying
* @param that
*/
PhpFunction(const PhpFunction &that) = delete;
/**
* Destructor
*/
virtual ~PhpFunction() = default;
/**
* Method that is called when the function is invoked
* @param params
* @return Php::Value
*/
Php::Value __invoke(Php::Parameters ¶ms);
};
/**
* End namespace
*/
}