Definition
abstract class Definition (View source)
Rule definition class.
Constants
protected DEFAULT |
Rule definition array defaults. |
SCHEMA |
Rule definition schema/structure. NOTE: All words prefixed with the
|
Properties
protected array<string,null|string|array|callable> | $definition | Rule definition array. |
Methods
Sets the arguments of the rule (returns object), or gets it if parameter is false
or not specified.
Asserts that the rule definition is valid.
Sets the callback of the rule (returns object), or gets it if parameter is false
or not specified.
Sets the comparison of the rule (returns object), or gets it if parameter is false
or not specified.
Sets the description of the rule (returns object), or gets it if parameter is false
or not specified.
Sets the example of the rule (returns object), or gets it if parameter is false
or not specified.
Gets the arguments of the rule.
Gets the callback of the rule.
Gets the comparison of the rule.
Gets rule definition array.
Gets the description of the rule.
Gets the example of the rule.
Gets the message of the rule.
Gets the name of the rule.
Gets the parameters of the rule.
Gets the variables of the rule.
Sets the message of the rule (returns object), or gets it if parameter is false
or not specified.
Sets the name of the rule (returns object), or gets it if parameter is false
or not specified.
Sets the parameters of the rule (returns object), or gets it if parameter is false
or not specified.
Gets the arguments of the rule.
Sets the callback of the rule.
Sets the comparison of the rule.
Sets rule definition array.
Sets the description of the rule.
Sets the example of the rule.
Sets the message of the rule.
Sets the name of the rule.
Sets the parameters of the rule.
Sets the variables of the rule.
Sets the variables of the rule (returns object), or gets it if parameter is false
or not specified.
Details
array|static
arguments(array|false $arguments = false)
Sets the arguments of the rule (returns object), or gets it if parameter is false
or not specified.
protected void
assertDefinitionIsValid(array $definition)
Asserts that the rule definition is valid.
callable|static
callback(callable|false $callback = false)
Sets the callback of the rule (returns object), or gets it if parameter is false
or not specified.
array|static
comparison(array|false $comparison = false)
Sets the comparison of the rule (returns object), or gets it if parameter is false
or not specified.
null|string|static
description(string|false $description = false)
Sets the description of the rule (returns object), or gets it if parameter is false
or not specified.
null|string|static
example(string|false $example = false)
Sets the example of the rule (returns object), or gets it if parameter is false
or not specified.
array
getArguments()
Gets the arguments of the rule.
callable
getCallback()
Gets the callback of the rule.
array
getComparison()
Gets the comparison of the rule.
array
getDefinition()
Gets rule definition array.
string|null
getDescription()
Gets the description of the rule.
string|null
getExample()
Gets the example of the rule.
string
getMessage()
Gets the message of the rule.
string
getName()
Gets the name of the rule.
array
getParameters()
Gets the parameters of the rule.
array|null
getVariables()
Gets the variables of the rule.
string|static
message(string|false $message = false)
Sets the message of the rule (returns object), or gets it if parameter is false
or not specified.
string|static
name(string|false $name = false)
Sets the name of the rule (returns object), or gets it if parameter is false
or not specified.
array|static
parameters(array|false $parameters = false)
Sets the parameters of the rule (returns object), or gets it if parameter is false
or not specified.
Definition
setArguments(array $arguments)
Gets the arguments of the rule.
Definition
setCallback(callable $callback)
Sets the callback of the rule.
Definition
setComparison(array $comparison)
Sets the comparison of the rule.
Definition
setDefinition(array $definition)
Sets rule definition array.
Definition
setDescription(string $description)
Sets the description of the rule.
Definition
setExample(string $example)
Sets the example of the rule.
Definition
setMessage(string $message)
Sets the message of the rule.
Definition
setName(string $name)
Sets the name of the rule.
Definition
setParameters(array $parameters)
Sets the parameters of the rule.
Definition
setVariables(array|null $variables)
Sets the variables of the rule.
null|array|static
variables(null|array|false $variables = false)
Sets the variables of the rule (returns object), or gets it if parameter is false
or not specified.