lithium\template\view\Renderer::context PHP Method

context() public method

Returns either one or all context values for this rendering context. Context values persist across all templates rendered in the current context, and are usually outputted in a layout template.
See also: lithium\template\view\Renderer::$_context
public context ( string $property = null ) : mixed
$property string If unspecified, an associative array of all context values is returned. If a string is specified, the context value matching the name given will be returned, or `null` if that name does not exist.
return mixed A string or array, depending on whether `$property` is specified.
    public function context($property = null)
    {
        if ($property) {
            return isset($this->_context[$property]) ? $this->_context[$property] : null;
        }
        return $this->_context;
    }