-
Notifications
You must be signed in to change notification settings - Fork 25
/
array.h
60 lines (54 loc) · 948 Bytes
/
array.h
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
/**
* array.h
*
* Class that wraps around a PHP array to make it available
* in ecmascript. As in PHP, properties added to the array,
* both from ecmascript and PHP, will become visible on the
* other side.
*
* @copyright 2015 Copernica B.V.
*/
/**
* Include guard
*/
#pragma once
/**
* Dependencies
*/
#include <phpcpp.h>
#include <v8.h>
#include "stack.h"
/**
* Start namespace
*/
namespace JS {
/**
* Class definition
*/
class Array
{
private:
/**
* The object template
* @var Stack<v8::ObjectTemplate>
*/
Stack<v8::ObjectTemplate> _template;
public:
/**
* Constructor
*
* @param array The array to wrap
*/
Array(Php::Array array);
/**
* Retrieve the ecmascript object handle
* that can be assigned directly to v8
*
* @return v8::Local<v8::Value>
*/
operator v8::Local<v8::Value> ();
};
/**
* End namespace
*/
}