public static function getPhoneValidationRegex() { if (is_null(self::$_phoneValidationRegex)) { self::$_phoneValidationRegex = Zend_Registry::get('cfg')['validation']['regex']['phone']; } return self::$_phoneValidationRegex; }
public function setVisitorPhone($phone) { $phone = new MedOptima_Phone($phone); if ($phone->validate()) { $this->_dataWorker->setValue('visitorPhone', $phone->getPrettyPhoneFormat()); } else { throw new Exception('Invalid phone'); } }