/** * Sets default option values for this instance * * @param boolean $allowWhiteSpace * @return void */ public function __construct($allowWhiteSpace = false) { $this->allowWhiteSpace = (boolean) $allowWhiteSpace; if (null === self::$_unicodeEnabled) { self::$_unicodeEnabled = (@preg_match('/\pL/u', 'a')) ? true : false; } }
/** * Sets default option values for this instance * * @param boolean $allowWhiteSpace * @return void */ public function __construct($allowWhiteSpace = false) { $this->allowWhiteSpace = (bool) $allowWhiteSpace; if (null === self::$_unicodeEnabled) { self::$_unicodeEnabled = @preg_match('/\\pL/u', 'a') ? true : false; } if (null === self::$_meansEnglishAlphabet) { $this->_locale = new Zend_Locale(Zend_Locale::BROWSER); self::$_meansEnglishAlphabet = in_array($this->_locale->getLanguage(), array('ja')); } }
/** * Sets default option values for this instance * * @param boolean $allowWhiteSpace * @return void */ public function __construct($allowWhiteSpace = false) { if ($allowWhiteSpace instanceof Zend_Config) { $allowWhiteSpace = $allowWhiteSpace->toArray(); } elseif (is_array($allowWhiteSpace)) { if (array_key_exists('allowwhitespace', $allowWhiteSpace)) { $allowWhiteSpace = $allowWhiteSpace['allowwhitespace']; } else { $allowWhiteSpace = false; } } $this->allowWhiteSpace = (bool) $allowWhiteSpace; if (null === self::$_unicodeEnabled) { self::$_unicodeEnabled = @preg_match('/\\pL/u', 'a') ? true : false; } if (null === self::$_meansEnglishAlphabet) { $this->_locale = new Zend_Locale('auto'); self::$_meansEnglishAlphabet = in_array($this->_locale->getLanguage(), array('ja', 'ko', 'zh')); } }