Page MenuHomeWickedGov Phorge

NamespaceUri.php
No OneTemporary

Size
595 B
Referenced Files
None
Subscribers
None

NamespaceUri.php

<?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)
);
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Oct 3, 19:27 (2 d, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ff/f9/7b5b99133f506f62fc3641caad3f
Default Alt Text
NamespaceUri.php (595 B)

Event Timeline