Lines Matching defs:scheme

65     protected $scheme = null;
112 * Each key is the scheme, each value is an array with each key as the IRI
194 // ischeme -> scheme
203 if ($return === null && isset($this->normalization[$this->scheme][$name])) {
204 return $this->normalization[$this->scheme][$name];
269 } elseif ($relative->scheme !== null) {
275 if ($base->scheme !== null && $base->is_valid()) {
279 $target->scheme = $base->scheme;
282 $target->scheme = $base->scheme;
321 * Parse an IRI into scheme/authority/path/query/fragment segments
329 if (preg_match('/^((?P<scheme>[^:\/?#]+):)?(\/\/(?P<authority>[^\/?#]*))?(?P<path>[^?#]*)(\?(?P<query>[^#]*))?(#(?P<fragment>.*))?$/', $iri, $match)) {
331 $match['scheme'] = null;
653 if (isset($this->normalization[$this->scheme]['iuserinfo']) && $this->iuserinfo === $this->normalization[$this->scheme]['iuserinfo']) {
656 if (isset($this->normalization[$this->scheme]['ihost']) && $this->ihost === $this->normalization[$this->scheme]['ihost']) {
659 if (isset($this->normalization[$this->scheme]['port']) && $this->port === $this->normalization[$this->scheme]['port']) {
662 if (isset($this->normalization[$this->scheme]['ipath']) && $this->ipath === $this->normalization[$this->scheme]['ipath']) {
665 if (isset($this->normalization[$this->scheme]['iquery']) && $this->iquery === $this->normalization[$this->scheme]['iquery']) {
668 if (isset($this->normalization[$this->scheme]['ifragment']) && $this->ifragment === $this->normalization[$this->scheme]['ifragment']) {
697 if (!$this->scheme && !$isauthority &&
729 $this->scheme,
747 $return = $this->set_scheme($parsed['scheme'])
754 $this->scheme,
768 * Set the scheme. Returns true on success, false on failure (if there are
771 * @param string $scheme
774 public function set_scheme($scheme)
776 if ($scheme === null) {
777 $this->scheme = null;
778 } elseif (!preg_match('/^[A-Za-z][0-9A-Za-z+\-.]*$/', $scheme)) {
779 $this->scheme = null;
782 $this->scheme = strtolower($scheme);
955 $this->ipath = $cache[$ipath][(int) ($this->scheme !== null)];
961 $this->ipath = ($this->scheme !== null) ? $removed : $valid;
1037 if ($this->scheme !== null) {
1038 $iri .= $this->scheme . ':';
1045 } elseif (!empty($this->normalization[$this->scheme]['ipath']) && $iauthority !== null && $iauthority !== '') {
1046 $iri .= $this->normalization[$this->scheme]['ipath'];