This repository was archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathSymbolValue.php
176 lines (156 loc) · 3.87 KB
/
SymbolValue.php
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?php declare(strict_types=1);
/**
* This file is part of the phpv8/php-v8 PHP extension.
*
* Copyright (c) 2015-2018 Bogdan Padalko <thepinepain@gmail.com>
*
* Licensed under the MIT license: http://opensource.org/licenses/MIT
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this source or visit
* http://opensource.org/licenses/MIT
*/
namespace V8;
/**
* A JavaScript symbol (ECMA-262 edition 6)
*
* This is an experimental feature. Use at your own risk.
*/
class SymbolValue extends NameValue
{
/**
* Create a symbol. If name is not empty, it will be used as the description.
*
* @param Isolate $isolate
* @param StringValue $name
*/
public function __construct(Isolate $isolate, StringValue $name = null)
{
}
/**
* @return string
*/
public function value(): string
{
}
/**
* Returns the print name string of the symbol, or undefined if none.
*
* @return Value|StringValue|UndefinedValue
*/
public function name(): Value
{
}
/**
* Access global symbol registry.
* Note that symbols created this way are never collected, so
* they should only be used for statically fixed properties.
* Also, there is only one global name space for the names used as keys.
* To minimize the potential for clashes, use qualified names as keys.
*
* // NOTE: original v8::Symbol::For() accepts isolate instead of context
*
* @param Context $context
* @param StringValue $name
*
* @return SymbolValue
*/
public static function createFor(Context $context, StringValue $name): SymbolValue
{
}
/**
* Retrieve a global symbol. Similar to |For|, but using a separate
* registry that is not accessible by (and cannot clash with) JavaScript code.
*
* // NOTE: original v8::Symbol::ForApi() accepts isolate instead of context
*
* @param Context $context
* @param StringValue $name
*
* @return SymbolValue
*/
public static function createForApi(Context $context, StringValue $name): SymbolValue
{
}
// Well-known symbols
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getHasInstanceSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getIsConcatSpreadableSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getIteratorSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getMatchSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getReplaceSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getSearchSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getSplitSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getToPrimitiveSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getToStringTagSymbol(Isolate $isolate): SymbolValue
{
}
/**
* @param Isolate $isolate
*
* @return SymbolValue
*/
public static function getUnscopablesSymbol(Isolate $isolate): SymbolValue
{
}
}