protected function _getVariable($tag_name) {
		if ($tag_name === '.') {
			return $this->_context[0];
		} else if (strpos($tag_name, '.') !== false) {
			$chunks = explode('.', $tag_name);
			$first = array_shift($chunks);

			$ret = $this->_findVariableInContext($first, $this->_context);
			foreach ($chunks as $next) {
				// Slice off a chunk of context for dot notation traversal.
				$c = array($ret);
				$ret = $this->_findVariableInContext($next, $c);
			}
			return $ret;
		} else {
			return $this->_findVariableInContext($tag_name, $this->_context);
		}
	}
protected function _getVariable($tag_name) {
		if ($tag_name === '.') {
			return $this->_context[0];
		} else if (strpos($tag_name, '.') !== false) {
			$chunks = explode('.', $tag_name);
			$first = array_shift($chunks);

			$ret = $this->_findVariableInContext($first, $this->_context);
			foreach ($chunks as $next) {
				// Slice off a chunk of context for dot notation traversal.
				$c = array($ret);
				$ret = $this->_findVariableInContext($next, $c);
			}
			return $ret;
		} else {
			return $this->_findVariableInContext($tag_name, $this->_context);
		}
	}
protected function _getVariable ( $ tag_name ) { if ( $ tag_name === '.' ) { return $ this -> _context [ 0 ] ; } else if ( strpos ( $ tag_name , '.' ) !== false ) { $ chunks = explode ( '.' , $ tag_name ) ; $ first = array_shift ( $ chunks ) ; $ ret = $ this -> _findVariableInContext ( $ first , $ this -> _context ) ; foreach ( $ chunks as $ next ) { // Slice off a chunk of context for dot notation traversal. $ c = array ( $ ret ) ; $ ret = $ this -> _findVariableInContext ( $ next , $ c ) ; } return $ ret ; } else { return $ this -> _findVariableInContext ( $ tag_name , $ this -> _context ) ; } }
Get a variable from the context array.

If the view is an array, returns the value with array key $tag_name.
If the view is an object, this will check for a public member variable
named $tag_name. If none is available, this method will execute and return
any class method named $tag_name. Failing all of the above, this method will
return an empty string.

@access protected
@param string $tag_name
@throws MustacheException Unknown variable name.
@return string
Get a variable from the context array .