Lines Matching refs:variable
106 * @param array $data Associative array where key is the name of the @data variable and value is the value.
206 * @param string $variableName name of variable or a callable on current context
221 * variable , ../variable , variable.variable , .
226 * @throws InvalidArgumentException in strict mode and variable not found
247 'can not find variable in context'
262 'can not find variable in context'
281 * Given a data variable, retrieves the value associated.
300 'Can not find variable in context'
320 'Can not find variable in context'
340 'Can not find variable in context'
351 * Check if $variable->$inside is available
353 * @param mixed $variable variable to check
357 * @throws \InvalidArgumentException in strict mode and variable not found
360 private function findVariableInContext($variable, $inside, $strict = false)
364 return $variable;
365 } elseif (is_array($variable)) {
366 if (isset($variable[$inside])) {
367 $value = $variable[$inside];
369 } elseif (is_object($variable)) {
370 if (isset($variable->$inside)) {
371 $value = $variable->$inside;
372 } elseif (is_callable(array($variable, $inside))) {
373 $value = call_user_func(array($variable, $inside));
376 $value = $variable;
378 throw new InvalidArgumentException('can not find variable in context');