Bolt\Twig\TwigExtension::safeString PHP Method

safeString() public method

See also: Bolt\Twig\Handler\TextHandler::safeString()
public safeString ( $str, $strict = false, $extrachars = '' )
    public function safeString($str, $strict = false, $extrachars = '')
    {
        return $this->handlers['text']->safeString($str, $strict, $extrachars);
    }

Usage Example

Example #1
0
 public function testSafeString()
 {
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $handlers['text'] = $this->getMockHandler('TextHandler', 'safeString');
     $twig = new TwigExtension($app, $handlers, true);
     $twig->safeString(null, null, null);
 }