lithium\template\view\Renderer::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.

Parameters

  • string $property

    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.

Returns

mixed

A string or array, depending on whether $property is specified.

Source

	public function context($property = null) {
		if ($property) {
			return isset($this->_context[$property]) ? $this->_context[$property] : null;
		}
		return $this->_context;
	}