JavascriptFunction
in package
implements
Stringable
Read onlyYes
FinalYes
This is a value object for an anonymous javascript function.
The way to use it is something like this:
$function = new JavascriptFunction("() => true");
$js = <<<JS
const func = {$javascriptFunction};
JS;
Table of Contents
Interfaces
- Stringable
Properties
- $definition : string
Methods
- __construct() : mixed
- __toString() : string
Properties
$definition
private
string
$definition
Methods
__construct()
public
__construct(string $definition) : mixed
Parameters
- $definition : string
__toString()
public
__toString() : string