-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathphp_variable.h
More file actions
63 lines (54 loc) · 948 Bytes
/
php_variable.h
File metadata and controls
63 lines (54 loc) · 948 Bytes
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
/**
* PhpVariable.h
*
* Class that we use to convert a variable from javascript context
* back into PHP context
*
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2025 Copernica BV
*/
/**
* Include guard
*/
#pragma once
/**
* Dependencies
*/
#include <phpcpp.h>
#include <v8.h>
/**
* Begin of namespace
*/
namespace JS {
/**
* Class definition
*/
class PhpVariable
{
private:
/**
* The PHP value
* @var Php::Value
*/
Php::Value _value;
public:
/**
* Constructor
* @param isolate
* @param value
*/
PhpVariable(v8::Isolate *isolate, const v8::Handle<v8::Value> &value);
/**
* Destructor
*/
virtual ~PhpVariable() = default;
/**
* Cast to the underlying PHP value
* @return Php::Value
*/
operator const Php::Value& () const { return _value; }
};
/**
* End of namespace
*/
}