Bolt\Twig\TwigExtension::pregReplace PHP Метод

pregReplace() публичный Метод

См. также: Bolt\Twig\Handler\TextHandler::pregReplace()
public pregReplace ( $str, $pattern, $replacement = '', $limit )
    public function pregReplace($str, $pattern, $replacement = '', $limit = -1)
    {
        return $this->handlers['text']->pregReplace($str, $pattern, $replacement, $limit);
    }

Usage Example

Пример #1
0
 public function testPregReplace()
 {
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $handlers['text'] = $this->getMockHandler('TextHandler', 'pregReplace');
     $twig = new TwigExtension($app, $handlers, true);
     $twig->pregReplace(null, null, null, null);
 }