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 pathFunctionObject.php
140 lines (123 loc) · 3.14 KB
/
FunctionObject.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
<?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 function object (ECMA-262, 15.3).
*/
class FunctionObject extends ObjectValue
{
/**
* Create a function in the current execution context
* for a given FunctionCallback.
*
* @param Context $context
* @param callable $callback
* @param int $length
* @param int $behavior
*/
public function __construct(Context $context, callable $callback, int $length = 0, int $behavior = ConstructorBehavior::ALLOW)
{
parent::__construct($context);
}
/**
* @param Context $context
* @param Value[] $arguments
*
* @return ObjectValue
*/
public function newInstance(Context $context, array $arguments = []): ObjectValue
{
}
/**
* @param Context $context
* @param Value $recv
* @param Value[] $arguments
*
* @return Value|PrimitiveValue|ObjectValue
*/
public function call(Context $context, Value $recv, array $arguments = []): Value
{
}
/**
* @param StringValue $name
*/
public function setName(StringValue $name)
{
}
/**
* @return Value|StringValue
*/
public function getName(): Value
{
}
/**
* Name inferred from variable or property assignment of this function.
* Used to facilitate debugging and profiling of JavaScript code written
* in an OO style, where many functions are anonymous but are assigned
* to object properties.
*
* @return Value|StringValue
*/
public function getInferredName(): Value
{
}
/**
* User-defined name assigned to the "displayName" property of this function.
* Used to facilitate debugging and profiling of JavaScript code.
*
* @return Value|StringValue
*/
public function getDisplayName(): Value
{
}
/**
* Returns zero based line number of function body and
* null if no information available.
*
* @return int|null
*/
public function getScriptLineNumber(): ?int
{
}
/**
* Returns zero based column number of function body and
* null if no information available.
*
* @return int|null
*/
public function getScriptColumnNumber(): ?int
{
}
/**
* Returns script id where function was created and null if no information available.
*
* @return int
*/
public function getScriptId(): ?int
{
}
/**
* Returns the original function if this function is bound, else returns UndefinedValue.
*
* @return Value|FunctionObject|UndefinedValue
*/
public function getBoundFunction(): Value
{
}
/**
* @return ScriptOrigin
*/
public function getScriptOrigin(): ScriptOrigin
{
}
}