src/eMacros/Runtime/Symbol/SymbolSet.php
public function apply(Scope $scope, GenericList $arguments) {
		if (count($arguments) == 0) throw new \BadFunctionCallException("SymbolSet: No parameters found.");
		$ref = $arguments[0]->evaluate($scope);
		if (!is_string($ref) || empty($ref)) throw new \InvalidArgumentException("SymbolSet: Symbol must be specified as a non-empty string.");
		Symbol::validateSymbol($ref);
		$value = (count($arguments) > 1) ? $arguments[1]->evaluate($scope) : null;
		$scope->symbols[$ref] = $value;
	}
public function apply(Scope $scope, GenericList $arguments) {
		if (count($arguments) == 0) throw new \BadFunctionCallException("SymbolSet: No parameters found.");
		$ref = $arguments[0]->evaluate($scope);
		if (!is_string($ref) || empty($ref)) throw new \InvalidArgumentException("SymbolSet: Symbol must be specified as a non-empty string.");
		Symbol::validateSymbol($ref);
		$value = (count($arguments) > 1) ? $arguments[1]->evaluate($scope) : null;
		$scope->symbols[$ref] = $value;
	}
public function apply ( Scope $ scope , GenericList $ arguments ) { if ( count ( $ arguments ) == 0 ) throw new \ BadFunctionCallException ( "SymbolSet: No parameters found." ) ; $ ref = $ arguments [ 0 ] -> evaluate ( $ scope ) ; if ( ! is_string ( $ ref ) || empty ( $ ref ) ) throw new \ InvalidArgumentException ( "SymbolSet: Symbol must be specified as a non-empty string." ) ; Symbol :: validateSymbol ( $ ref ) ; $ value = ( count ( $ arguments ) > 1 ) ? $ arguments [ 1 ] -> evaluate ( $ scope ) : null ; $ scope -> symbols [ $ ref ] = $ value ; }
Defines a symbol value
Usage: (sym "value") (sym "counter" 0)
Returns: NULL
(non-PHPdoc)
@see \eMacros\Applicable::apply()
Defines a symbol value Usage : ( sym value ) ( sym counter 0 ) Returns : NULL ( non - PHPdoc )