/** * Uses the current value of $this->count to show line and line number * * @param type $msg X * * @return void */ protected function throwError($msg = null) { if ($this->sourceLoc >= 0) { $this->sourceParser->throwError($msg, $this->sourceLoc); } throw new exception($msg); }
/** * Inject array of unparsed strings into environment as variables * * @param type $args X * * @return void * * @throws \Exception */ protected function injectVariables($args) { $this->pushEnv(); /** FOF -- BEGIN CHANGE * */ $parser = new Parser($this, __METHOD__); /** FIF -- END CHANGE * */ foreach ($args as $name => $strValue) { if ($name[0] != '@') { $name = '@' . $name; } $parser->count = 0; $parser->buffer = (string) $strValue; if (!$parser->propertyValue($value)) { throw new \Exception("failed to parse passed in variable {$name}: {$strValue}"); } $this->set($name, $value); } }