Exemple #1
0
 /**
  *  Tell whether any generic URI is valid
  *
  * @return bool
  */
 protected function isValidGenericUri()
 {
     $path = $this->path->getUriComponent();
     if (false === strpos($path, ':')) {
         return true;
     }
     $path = explode(':', $path);
     $path = array_shift($path);
     $str = $this->scheme->getUriComponent() . $this->getAuthority();
     return !(empty($str) && strpos($path, '/') === false);
 }
Exemple #2
0
 /**
  * Return whether the scheme is supported by the Scheme registry
  *
  * @param  Interfaces\Scheme         $scheme
  * @param  Interfaces\SchemeRegistry $schemeRegistry
  *
  * @return bool
  */
 protected function isSchemeRegistered(Interfaces\Scheme $scheme, Interfaces\SchemeRegistry $schemeRegistry)
 {
     return $scheme->isEmpty() || $schemeRegistry->hasKey($scheme);
 }