JsFunction
in package
implements
JsExpression
A JavaScript function expression.
Table of Contents
Interfaces
- JsExpression
- For use with Js::encode().
Properties
Methods
- __construct() : mixed
- __toString() : mixed
- render() : string
- Render the expression as a string.
Properties
$args
public
array<string|int, string>
$args
$arrow
public
bool
$arrow
$function
public
string
$function
$inline
public
bool
$inline
$strip
public
bool
$strip
Methods
__construct()
public
__construct(array<string|int, mixed> $args, string $function[, bool $arrow = true ][, bool $inline = false ][, bool $strip = false ]) : mixed
Parameters
- $args : array<string|int, mixed>
-
argument names
- $function : string
-
code body
- $arrow : bool = true
-
use arrow syntax
- $inline : bool = false
-
an implicit return
- $strip : bool = false
-
strip whitespace from the function body
__toString()
public
__toString() : mixed
Tags
render()
Render the expression as a string.
public
render() : string