Пример #1
0
 /**
  * @param Variable $variable
  *
  * @throws \Exception
  *
  * @return mixed
  */
 public function visitVariable(Variable $variable)
 {
     if (isset($this->variables[$variable->name()])) {
         return $this->variables[$variable->name()];
     }
     throw new \Exception(\sprintf("Unknown variable '%s'", $variable->name()));
 }
 /**
  * @param Variable $variable
  *
  * @return string
  */
 public function visitVariable(Variable $variable)
 {
     return $variable->name();
 }