Example #1
0
 public function isValid()
 {
     if (!parent::isValid()) {
         return false;
     }
     return $this->isAbsolute() && $this->getAuthority() !== null || $this->isRelative() && $this->getAuthority() === null;
 }
Example #2
0
 public function isValid()
 {
     if ($this->scheme === null || $this->getAuthority() !== null) {
         return false;
     }
     return parent::isValid();
 }