コード例 #1
0
ファイル: File.php プロジェクト: navtis/xerxes-pazpar2
 /**
  * Check if the URI is a valid File URI
  * 
  * This applies additional specific validation rules beyond the ones 
  * required by the generic URI syntax.
  * 
  * @return boolean
  * @see    Uri::isValid()
  */
 public function isValid()
 {
     if ($this->query) {
         return false;
     }
     return parent::isValid();
 }
コード例 #2
0
 public function isValid($value)
 {
     if (!parent::isValid($value)) {
         return false;
     }
     $keys = array('Protocol', 'Username', 'Password', 'Domain', 'Tld', 'Port', 'Path', 'Anchor');
     foreach ($keys as $key) {
         $method = "get" . $key;
         if (!$this->validate($key, $this->URI->{$method}())) {
             $key = 'invalid' . $key;
             $this->error($key, $value);
         }
     }
     if ($this->hasMessages()) {
         return false;
     }
     return true;
 }
コード例 #3
0
ファイル: Http.php プロジェクト: bradley-holt/zf2
 /**
  * Check if the URI is a valid HTTP URI
  *
  * This applys additional HTTP specific validation rules beyond the ones
  * required by the generic URI syntax
  *
  * @return boolean
  * @see    Uri::isValid()
  */
 public function isValid()
 {
     return parent::isValid();
 }