V8Js::getPendingException
V8JsException
V8Js
PHP Manual

# V8Js::registerExtension

(PECL v8js >= 0.1.0)

V8Js::registerExtension — Register Javascript extensions for V8Js

### Descrição

public static bool V8Js::registerExtension ( string `$extension_name` , string `$script` [, array `$dependencies` = array() [, bool `$auto_enable` = `FALSE` ]] )

Registers passed Javascript `script` as extension to be used in V8Js contexts.

### Parâmetros

`extension_name`

  Name of the extension to be registered.

`script`

  The Javascript code to be registered.

`dependencies`

  Array of extension names the extension to be registered depends on. Any such extension is enabled automatically when this extension is loaded.

  > Nota:

  > All extensions, including the dependencies, must be registered before any V8Js are created which use them.

`auto_enable`

  If set to `TRUE`, the extension will be enabled automatically in all V8Js contexts.

### Valor Retornado

Returns `TRUE` if extension was registered successfully, `FALSE` otherwise.

V8Js::getPendingException
V8JsException
V8Js
PHP Manual