18 ->
raw(sprintf(
'(is_string($%s = ', $left))
19 ->subcompile($this->
getNode(
'left'))
20 ->raw(sprintf(
') && is_string($%s = ', $right))
21 ->subcompile($this->
getNode(
'right'))
22 ->raw(sprintf(
') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right))
28 return $compiler->
raw(
'');
32 class_alias(
'Twig_Node_Expression_Binary_StartsWith',
'Twig\Node\Expression\Binary\StartsWithBinary',
false);
raw($string)
Adds a raw string to the compiled code.
operator(Twig_Compiler $compiler)
compile(Twig_Compiler $compiler)
Compiles the node to PHP.