src/Sulu/Component/Webspace/Loader/XmlFileLoader10.php
protected function generateCustomUrls(\DOMNode $environmentNode, Environment $environment)
    {
        foreach ($this->xpath->query('x:custom-urls/x:custom-url', $environmentNode) as $urlNode) {
            /** @var \DOMNode $urlNode */
            $url = new CustomUrl();

            $url->setUrl(rtrim($urlNode->nodeValue, '/'));

            if (false === strpos($url->getUrl(), '*')) {
                throw new InvalidCustomUrlException($this->webspace, $url->getUrl());
            }

            $environment->addCustomUrl($url);
        }
    }
protected function generateCustomUrls(\DOMNode $environmentNode, Environment $environment)
    {
        foreach ($this->xpath->query('x:custom-urls/x:custom-url', $environmentNode) as $urlNode) {
            /** @var \DOMNode $urlNode */
            $url = new CustomUrl();

            $url->setUrl(rtrim($urlNode->nodeValue, '/'));

            if (false === strpos($url->getUrl(), '*')) {
                throw new InvalidCustomUrlException($this->webspace, $url->getUrl());
            }

            $environment->addCustomUrl($url);
        }
    }
protected function generateCustomUrls ( \ DOMNode $ environmentNode , Environment $ environment ) { foreach ( $ this -> xpath -> query ( 'x:custom-urls/x:custom-url' , $ environmentNode ) as $ urlNode ) { /** @var \DOMNode $urlNode */ $ url = new CustomUrl ( ) ; $ url -> setUrl ( rtrim ( $ urlNode -> nodeValue , '/' ) ) ; if ( false === strpos ( $ url -> getUrl ( ) , '*' ) ) { throw new InvalidCustomUrlException ( $ this -> webspace , $ url -> getUrl ( ) ) ; } $ environment -> addCustomUrl ( $ url ) ; } }
Generates the custom URLs from the XML document.

A custom URL must contain at lease one *, which will be used as a placeholder.

@param \DOMNode $environmentNode
@param Environment $environment

@throws InvalidCustomUrlException
Generates the custom URLs from the XML document .