Ejemplo n.º 1
0
 /**
  * Evaluates the given binding expression on the component's context.
  *
  * <p>This method is an **extension hook** that allows a subclass to modify the evaluation result.
  * > <p>**Ex.** see the {@see Text} component.
  *
  * @param Expression $bindExp
  * @return mixed
  * @throws ComponentException
  * @throws DataBindingException
  */
 protected function evalBinding(Expression $bindExp)
 {
     $binder = $this->getDataBinder();
     if (!$binder) {
         _log()->warning("No binder is set for evaluating an expression on a " . $this->getTagName() . " component");
         return null;
     }
     try {
         /** @var Component $this */
         return $bindExp->evaluate($binder);
     } catch (\Exception $e) {
         self::evalError($e, $bindExp);
     } catch (\Error $e) {
         self::evalError($e, $bindExp);
     }
 }