Twig_Environment::getBinaryOperators PHP Method

getBinaryOperators() public method

public getBinaryOperators ( )
    public function getBinaryOperators()
    {
        if (null === $this->binaryOperators) {
            $this->initOperators();
        }

        return $this->binaryOperators;
    }

Same methods

Twig_Environment::getBinaryOperators ( ) : array

Usage Example

 public function __construct(Twig_Parser $parser, Twig_Environment $env = null)
 {
     $this->parser = $parser;
     if ($env instanceof Twig_Environment) {
         $this->env = $env;
         $this->unaryOperators = $env->getUnaryOperators();
         $this->binaryOperators = $env->getBinaryOperators();
     } else {
         @trigger_error('Passing the operators as constructor arguments to ' . __METHOD__ . ' is deprecated since version 1.27. Pass the environment instead.', E_USER_DEPRECATED);
         $this->env = $parser->getEnvironment();
         $this->unaryOperators = func_get_arg(1);
         $this->binaryOperators = func_get_arg(2);
     }
 }
All Usage Examples Of Twig_Environment::getBinaryOperators