FluentDOM\Document::getNamespace PHP Method

getNamespace() public method

Get the namespace for a given prefix
public getNamespace ( string $prefix ) : string
$prefix string
return string
    public function getNamespace($prefix)
    {
        $prefix = $this->validatePrefix($prefix);
        if (isset($this->_reserved[$prefix])) {
            return $this->_reserved[$prefix];
        }
        if (isset($this->_namespaces[$prefix])) {
            return $this->_namespaces[$prefix];
        }
        if ($prefix === '#default') {
            return '';
        }
        throw new \LogicException(sprintf('Unknown namespace prefix "%s".', $prefix));
    }