Goetas\Twital\EventSubscriber\CustomNamespaceRawSubscriber::removeCustomNamespaces PHP Method

removeCustomNamespaces() public method

public removeCustomNamespaces ( SourceEvent $event )
$event Goetas\Twital\EventDispatcher\SourceEvent
    public function removeCustomNamespaces(SourceEvent $event)
    {
        $template = $event->getTemplate();
        foreach ($this->customNamespaces as $prefix => $ns) {
            $template = preg_replace('#<(.*) xmlns:' . $prefix . '="' . $ns . '"(.*)>#mi', "<\\1\\2>", $template);
        }
        $event->setTemplate($template);
    }