Consume a list of values for a property
public propertyValue ( &$value, [type] $keyName = null ) : boolean | ||
$keyName | [type] | |
return | boolean |
/** * 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); } }