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