Definition at line 37 of file Alnum.php.
◆ __construct()
__construct |
( |
|
$allowWhiteSpace = false | ) |
|
Sets default option values for this instance
- Parameters
-
- Returns
- void
Definition at line 74 of file Alnum.php.
87 if (
null === self::$_unicodeEnabled) {
88 self::$_unicodeEnabled = (@preg_match(
'/\pL/u',
'a')) ?
true :
false;
91 if (
null === self::$_meansEnglishAlphabet) {
93 self::$_meansEnglishAlphabet = in_array($this->_locale->getLanguage(),
94 array(
'ja',
'ko',
'zh')
◆ filter()
Defined by Zend_Filter_Interface
Returns the string $value, removing all but alphabetic and digit characters
- Parameters
-
- Returns
- string
Implements Zend_Filter_Interface.
Definition at line 130 of file Alnum.php.
132 $whiteSpace = $this->allowWhiteSpace ?
'\s' :
'';
133 if (!self::$_unicodeEnabled) {
135 $pattern =
'/[^a-zA-Z0-9' . $whiteSpace .
']/';
136 }
else if (self::$_meansEnglishAlphabet) {
138 $pattern =
'/[^a-zA-Z0-9' . $whiteSpace .
']/u';
141 $pattern =
'/[^\p{L}\p{N}' . $whiteSpace .
']/u';
◆ getAllowWhiteSpace()
Returns the allowWhiteSpace option
- Returns
- boolean
Definition at line 105 of file Alnum.php.
◆ setAllowWhiteSpace()
setAllowWhiteSpace |
( |
|
$allowWhiteSpace | ) |
|
◆ $_locale
◆ $_meansEnglishAlphabet
◆ $_unicodeEnabled
◆ $allowWhiteSpace
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Filter/Alnum.php