Definition at line 31 of file Identical.php.
◆ __construct()
__construct |
( |
|
$token = null | ) |
|
Sets validator options
- Parameters
-
Definition at line 69 of file Identical.php.
75 if (is_array(
$token) && array_key_exists(
'token',
$token)) {
76 if (array_key_exists(
'strict',
$token)) {
81 }
else if (
null !==
$token) {
◆ getStrict()
Returns the strict parameter
- Returns
- boolean
Definition at line 114 of file Identical.php.
◆ getToken()
◆ isValid()
isValid |
( |
|
$value, |
|
|
|
$context = null |
|
) |
| |
Defined by Zend_Validate_Interface
Returns true if and only if a token has been set and the provided value matches that token.
- Parameters
-
mixed | $value | |
array | $context | |
- Returns
- boolean
Definition at line 141 of file Identical.php.
145 if (($context !==
null) && isset($context) && array_key_exists($this->
getToken(), $context)) {
152 $this->
_error(self::MISSING_TOKEN);
158 $this->
_error(self::NOT_SAME);
_error($messageKey, $value=null)
◆ setStrict()
Sets the strict parameter
- Parameters
-
- Returns
- $this
Definition at line 125 of file Identical.php.
127 $this->_strict = (boolean) $strict;
◆ setToken()
◆ $_messageTemplates
Initial value:= array(
self::NOT_SAME => "The two given tokens do not match",
self::MISSING_TOKEN => 'No token was provided to match against',
)
Definition at line 44 of file Identical.php.
◆ $_messageVariables
Initial value:= array(
'token' => '_tokenString'
)
Definition at line 52 of file Identical.php.
◆ $_strict
◆ $_token
◆ $_tokenString
◆ MISSING_TOKEN
const MISSING_TOKEN = 'missingToken' |
◆ NOT_SAME
const NOT_SAME = 'notSame' |
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Validate/Identical.php