bool|PEAR_Error assign(
$args, string|array|object
$args[0], mixed
$args[1])
|
|
Assigns a token-name and value to $this->_token_vars for use in a template.
There are three valid ways to assign values to a template.
Form 1: $args[0] is a string and $args[1] is mixed. This means $args[0] is a token name and $args[1] is the token value (which allows objects, arrays, strings, numbers, or anything else). $args[1] can be null, which means the corresponding token value in the template will also be null.
Form 2: $args[0] is an array and $args[1] is not set. Assign a series of tokens where the key is the token name, and the value is token value.
Form 3: $args[0] is an object and $args[1] is not set. Assigns copies of all object variables (properties) to tokens; the token name and value is a copy of each object property and value.
Parameters: