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

Commit

Permalink
Improve stubs [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pinepain committed May 2, 2017
1 parent 64ec8a5 commit b446a1e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
15 changes: 15 additions & 0 deletions stubs/src/NamedPropertyHandlerConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,25 @@ class NamedPropertyHandlerConfiguration
{
/**
* @param callable $getter The callback to invoke when getting a property.
* Callback signature is (NameValue $name, PropertyCallbackInfo $args)
* ReturnValue from $args->GetReturnValue() accepts any value.
*
* @param callable $setter The callback to invoke when setting a property.
* Callback signature is (\V8\NameValue $name, \V8\Value $value, PropertyCallbackInfo $args)
* ReturnValue from $args->GetReturnValue() accepts any value
*
* @param callable $query The callback to invoke to check if a property is present, and if present, get its attributes.
* Callback signature is (\V8\NameValue $name, PropertyCallbackInfo $args)
* ReturnValue from $args->GetReturnValue() accepts integer only
*
* @param callable $deleter The callback to invoke when deleting a property.
* Callback signature is (\V8\NameValue $name, PropertyCallbackInfo $args)
* ReturnValue from $args->GetReturnValue() accepts boolean only
*
* @param callable $enumerator The callback to invoke to enumerate all the named properties of an object.
* Callback signature is (PropertyCallbackInfo $args).
* ReturnValue from $args->GetReturnValue() accepts ArrayObject only
*
* @param int $flags One of \v8\PropertyHandlerFlags constants
*/
public function __construct(
Expand Down
18 changes: 18 additions & 0 deletions stubs/src/PropertyHandlerFlags.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,28 @@
namespace V8;


/**
* Configuration flags for V8\NamedPropertyHandlerConfiguration or
* V8\IndexedPropertyHandlerConfiguration.
*/
class PropertyHandlerFlags
{
/**
* None.
*/
const kNone = 0;
/**
* See \V8\AccessControl::ALL_CAN_READ (all cross-context reads are allowed).
*/
const kAllCanRead = 1;
/** Will not call into interceptor for properties on the receiver or prototype
* chain, i.e., only call into interceptor for properties that do not exist.
* Currently only valid for named interceptors.
*/
const kNonMasking = 2;
/**
* Will not call into interceptor for symbol lookup. Only meaningful for
* named interceptors.
*/
const kOnlyInterceptStrings = 4;
}

0 comments on commit b446a1e

Please sign in to comment.