Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NamespaceUri.php

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\Tokenizer
View 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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal