Reserved
in package
implements
Rule
Reserved keyword rule.
Validates for the use of any PHP-reserved keywords or constants, as specified from the PHP Manual http://php.net/manual/en/reserved.keywords.php http://php.net/manual/en/reserved.other-reserved-words.php
Interfaces, Classes and Traits
Table of Contents
- $reserved : mixed
- message() : string
- Get the validation error message.
- passes() : bool
- Determine if the validation rule passes.
- validate() : bool
- Validate the provided value
Properties
$reserved
protected
mixed
$reserved
= ['__class__', '__dir__', '__file__', '__function__', '__halt_compiler', '__line__', '__method__', '__namespace__', '__trait__', 'abstract', 'and', 'array', 'as', 'bool', 'break', 'callable', 'case', 'catch', 'class', 'clone', 'const', 'continue', 'declare', 'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends', 'false', 'final', 'finally', 'float', 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements', 'include', 'include_once', 'instanceof', 'insteadof', 'int', 'interface', 'isset', 'iterable', 'list', 'mixed', 'namespace', 'new', 'null', 'numeric', 'object', 'or', 'print', 'private', 'protected', 'public', 'require', 'require_once', 'resource', 'return', 'static', 'string', 'switch', 'throw', 'trait', 'true', 'try', 'unset', 'use', 'var', 'void', 'while', 'xor', 'yield']
Methods
message()
Get the validation error message.
public
message() : string
Return values
string —passes()
Determine if the validation rule passes.
public
passes(string $attribute, mixed $value) : bool
Parameters
- $attribute : string
- $value : mixed
Return values
bool —validate()
Validate the provided value
public
validate(string $attribute, string $value, array<string|int, mixed> $params) : bool
Parameters
- $attribute : string
-
The attribute being tested
- $value : string
-
The value being tested
- $params : array<string|int, mixed>
-
The parameters passed to the rule