public function execute(Sandbox $sandbox)
  {
    $language = new ExpressionLanguage($sandbox);
    Container::getLogger()->info("Evaluating expression: " . $language->compile($this->expression));
    try {
      if ($return = $language->evaluate($this->expression)) {
        Container::getLogger()->debug(__CLASS__ . ": Expression PASSED: $return");
        return $return;
      }
    }
    catch (\Exception $e) {
      Container::getLogger()->warning($e->getMessage());
    }
    Container::getLogger()->debug(__CLASS__ . ": Expression FAILED.");

    // Execute the on fail behaviour.
    throw new DependencyException($this);
  }
public function execute(Sandbox $sandbox)
  {
    $language = new ExpressionLanguage($sandbox);
    Container::getLogger()->info("Evaluating expression: " . $language->compile($this->expression));
    try {
      if ($return = $language->evaluate($this->expression)) {
        Container::getLogger()->debug(__CLASS__ . ": Expression PASSED: $return");
        return $return;
      }
    }
    catch (\Exception $e) {
      Container::getLogger()->warning($e->getMessage());
    }
    Container::getLogger()->debug(__CLASS__ . ": Expression FAILED.");

    // Execute the on fail behaviour.
    throw new DependencyException($this);
  }
public function execute ( Sandbox $ sandbox ) { $ language = new ExpressionLanguage ( $ sandbox ) ; Container :: getLogger ( ) -> info ( "Evaluating expression: " . $ language -> compile ( $ this -> expression ) ) ; try { if ( $ return = $ language -> evaluate ( $ this -> expression ) ) { Container :: getLogger ( ) -> debug ( __CLASS__ . ": Expression PASSED: $return" ) ; return $ return ; } } catch ( \ Exception $ e ) { Container :: getLogger ( ) -> warning ( $ e -> getMessage ( ) ) ; } Container :: getLogger ( ) -> debug ( __CLASS__ . ": Expression FAILED." ) ; // Execute the on fail behaviour. throw new DependencyException ( $ this ) ; }
Evaluate the dependency.
Evaluate the dependency .