class NamespaceUri
Hierarchy
- class \TheSeer\Tokenizer\NamespaceUri
Expanded class hierarchy of NamespaceUri
1 file declares its use of NamespaceUri
- Source.php in vendor/
phpunit/ php-code-coverage/ src/ Report/ Xml/ Source.php
File
-
vendor/
theseer/ tokenizer/ src/ NamespaceUri.php, line 4
Namespace
TheSeer\TokenizerView source
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));
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
NamespaceUri::$value | private | property | @var string |
NamespaceUri::asString | public | function | |
NamespaceUri::ensureValidUri | private | function | |
NamespaceUri::__construct | public | function |