| Methods |
public
|
__construct(NodeDefinition $node)
|
#
|
public
|
always(Closure $then = null): $this
Marks the expression as being always used.
Marks the expression as being always used.
|
#
|
public
|
ifTrue(Closure $closure = null): $this
Sets a closure to use as tests.
Sets a closure to use as tests.
The default one tests if the value is true.
|
#
|
public
|
ifString(): $this
Tests if the value is a string.
Tests if the value is a string.
|
#
|
public
|
ifNull(): $this
Tests if the value is null.
Tests if the value is null.
|
#
|
public
|
ifEmpty(): $this
Tests if the value is empty.
Tests if the value is empty.
|
#
|
public
|
ifArray(): $this
Tests if the value is an array.
Tests if the value is an array.
|
#
|
public
|
ifInArray(array $array): $this
Tests if the value is in an array.
Tests if the value is in an array.
|
#
|
public
|
ifNotInArray(array $array): $this
Tests if the value is not in an array.
Tests if the value is not in an array.
|
#
|
public
|
castToArray(): $this
Transforms variables of any type into an array.
Transforms variables of any type into an array.
|
#
|
public
|
then(Closure $closure): $this
Sets the closure to run if the test pass.
Sets the closure to run if the test pass.
|
#
|
public
|
thenEmptyArray(): $this
Sets a closure returning an empty array.
Sets a closure returning an empty array.
|
#
|
public
|
thenInvalid(string $message): $this
Sets a closure marking the value as invalid at processing time.
Sets a closure marking the value as invalid at processing time.
if you want to add the value of the node in your message just use a %s placeholder.
Throws
|
#
|
public
|
thenUnset(): $this
Sets a closure unsetting this key of the array at processing time.
Sets a closure unsetting this key of the array at processing time.
Throws
|
#
|
public
|
end(): NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
Returns the related node.
Returns the related node.
Throws
|
#
|
public
static
|
buildExpressions(ExprBuilder[] $expressions): array
Builds the expressions.
Parameters
| $expressions |
An array of ExprBuilder instances to build
|
|
#
|