Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d5ffac5

Browse files
committed
add stubs for V8Object et al, fixes #1
1 parent 36e95ba commit d5ffac5

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

‎src/V8Function.php‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
/**
4+
* JavaScript function companion (for functions passed from JavaScript to PHP).
5+
*/
6+
final class V8Function
7+
{
8+
/**
9+
* V8Function must not be constructed directly.
10+
*
11+
* @throws V8JsException
12+
*/
13+
public function __construct()
14+
{}
15+
}

‎src/V8Generator.php‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
/**
4+
* JavaScript generator function companion (for generators passed from JavaScript to PHP).
5+
*/
6+
final class V8Generator implements Iterator
7+
{
8+
/**
9+
* V8Generator must not be constructed directly.
10+
*
11+
* @throws V8JsException
12+
*/
13+
public function __construct()
14+
{}
15+
16+
/**
17+
* {@inheritdoc}
18+
*/
19+
public function current()
20+
{ }
21+
22+
/**
23+
* {@inheritdoc}
24+
*/
25+
public function next()
26+
{ }
27+
28+
/**
29+
* Return the key of the current element
30+
* @return false
31+
*/
32+
public function key()
33+
{ }
34+
35+
/**
36+
* {@inheritdoc}
37+
*/
38+
public function valid()
39+
{ }
40+
41+
/**
42+
* JavaScript generators cannot be rewound.
43+
*
44+
* This methods throws an exception if called after generator has been started.
45+
*
46+
* @throws V8JsException
47+
* @return false
48+
*/
49+
public function rewind()
50+
{ }
51+
}

‎src/V8Object.php‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
/**
4+
* JavaScript object companion (for objects passed from JavaScript to PHP).
5+
*/
6+
final class V8Object
7+
{
8+
/**
9+
* V8Object must not be constructed directly.
10+
*
11+
* @throws V8JsException
12+
*/
13+
public function __construct()
14+
{}
15+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /