Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit 3dd24f2

Browse files
committed
Add docs ofr ObjectTemplate::SetHandler*() and *HandlerConfiguration classes [skip ci]
1 parent 5b51ced commit 3dd24f2

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

stubs/src/IndexedPropertyHandlerConfiguration.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
class IndexedPropertyHandlerConfiguration
2222
{
2323
/**
24-
* @param callable $getter
25-
* @param callable $setter
26-
* @param callable $query
27-
* @param callable $deleter
28-
* @param callable $enumerator
24+
* @param callable $getter The callback to invoke when getting a property.
25+
* @param callable $setter The callback to invoke when setting a property.
26+
* @param callable $query The callback to invoke to check if an object has a property.
27+
* @param callable $deleter The callback to invoke when deleting a property.
28+
* @param callable $enumerator The callback to invoke to enumerate all the indexed properties of an object.
2929
* @param int $flags One of \v8\PropertyHandlerFlags constants
3030
*/
3131
public function __construct(callable $getter,

stubs/src/NamedPropertyHandlerConfiguration.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
class NamedPropertyHandlerConfiguration
2222
{
2323
/**
24-
* @param callable $getter
25-
* @param callable $setter
26-
* @param callable $query
27-
* @param callable $deleter
28-
* @param callable $enumerator
24+
* @param callable $getter The callback to invoke when getting a property.
25+
* @param callable $setter The callback to invoke when setting a property.
26+
* @param callable $query The callback to invoke to check if a property is present, and if present, get its attributes.
27+
* @param callable $deleter The callback to invoke when deleting a property.
28+
* @param callable $enumerator The callback to invoke to enumerate all the named properties of an object.
2929
* @param int $flags One of \v8\PropertyHandlerFlags constants
3030
*/
3131
public function __construct(callable $getter,

stubs/src/ObjectTemplate.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,29 @@ public function SetAccessor(
102102
/**
103103
* Sets a named property handler on the object template.
104104
*
105+
* Whenever a property whose name is a string or a symbol is accessed on
106+
* objects created from this object template, the provided callback is
107+
* invoked instead of accessing the property directly on the JavaScript
108+
* object.
109+
*
105110
* See \v8\NamedPropertyHandlerConfiguration constructor argument description for details
106111
*
107-
* @param \v8\NamedPropertyHandlerConfiguration
112+
* @param \v8\NamedPropertyHandlerConfiguration The NamedPropertyHandlerConfiguration that defines the callbacks to invoke when accessing a property.
108113
*/
109114
public function SetHandlerForNamedProperty(NamedPropertyHandlerConfiguration $configuration)
110115
{
111116
}
112117

113118
/**
114-
* Sets a indexed property handler on the object template.
119+
* Sets an indexed property handler on the object template.
120+
*
121+
* Whenever an indexed property is accessed on objects created from
122+
* this object template, the provided callback is invoked instead of
123+
* accessing the property directly on the JavaScript object.
115124
*
116125
* See \v8\IndexedPropertyHandlerConfiguration constructor argument description for details
117126
*
118-
* @param \V8\IndexedPropertyHandlerConfiguration $configuration
127+
* @param \V8\IndexedPropertyHandlerConfiguration $configuration The IndexedPropertyHandlerConfiguration that defines the callbacks to invoke when accessing a property.
119128
*/
120129
public function SetHandlerForIndexedProperty(IndexedPropertyHandlerConfiguration $configuration)
121130
{

0 commit comments

Comments
 (0)