<?php declare(strict_types = 1); namespace TheSeer\Tokenizer; class NamespaceUri { /** @var string */ private $value; public function __construct(string $value) { $this->ensureValidUri($value); $this->value = $value; } public function asString(): string { return $this->value; } private function ensureValidUri($value): void { if (\strpos($value, ':') === false) { throw new NamespaceUriException( \sprintf("Namespace URI '%s' must contain at least one colon", $value) ); } } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Exception.php | File | 102 B | 0644 |
|
NamespaceUri.php | File | 595 B | 0644 |
|
NamespaceUriException.php | File | 113 B | 0644 |
|
Token.php | File | 644 B | 0644 |
|
TokenCollection.php | File | 2.19 KB | 0644 |
|
TokenCollectionException.php | File | 116 B | 0644 |
|
Tokenizer.php | File | 3.36 KB | 0644 |
|
XMLSerializer.php | File | 2.23 KB | 0644 |
|