Class Zend_Layout

Description

Provide Layout support for MVC applications

  • copyright: Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Layout.php (line 30)


	
			
Variable Summary
Method Summary
 static Zend_Layout|null getMvcInstance ()
 static void resetMvcInstance ()
 static Zend_Layout startMvc ([string|array|Zend_Config $options = null])
 void __construct ([string|array|Zend_Config $options = null], [ $initMvc = false])
 Zend_Layout assign (mixed $spec, [mixed $value = null])
 string getContentKey ()
 string getHelperClass ()
 string getInflectorTarget ()
 string getLayout ()
 string getLayoutPath ()
 bool getMvcEnabled ()
 string getPluginClass ()
 void getViewBasePath ()
 string getViewSuffix ()
 bool isEnabled ()
 mixed render ([mixed $name = null])
 Zend_Layout setConfig ( $config)
 Zend_Layout setContentKey (string $contentKey)
 Zend_Layout setHelperClass (string $helperClass)
 Zend_Layout setInflector ( $inflector)
 Zend_Layout setInflectorTarget (string $inflectorTarget)
 Zend_Layout setLayout (string $name)
 Zend_Layout setLayoutPath (string $path)
 Zend_Layout setMvcSuccessfulActionOnly (bool $successfulActionOnly)
 void setOptions (array $options)
 Zend_Layout setPluginClass (string $pluginClass)
 Zend_Layout setView ( $view)
 void setViewBasePath ( $path, [ $prefix = 'Layout_View'])
 void setViewScriptPath ( $path)
 Zend_Layout setViewSuffix (string $viewSuffix)
 void _initHelper ()
 void _initMvc ()
 void _initPlugin ()
 Zend_Layout _setMvcEnabled (bool $mvcEnabled)
 mixed __get (string $key)
 bool __isset (string $key)
 void __set (string $key, mixed $value)
 void __unset (string $key)
Variables
static Zend_Layout $_mvcInstance (line 99)

Instance registered with MVC, if any

  • access: protected

Placeholder container for layout variables

  • access: protected
string $_contentKey = 'content' (line 42)

Key used to store content from 'default' named response segment

  • access: protected
bool $_enabled = true (line 48)

Are layouts enabled?

  • access: protected
string $_helperClass = 'Zend_Layout_Controller_Action_Helper_Layout' (line 54)

Helper class

  • access: protected
Zend_Filter_Inflector $_inflector (line 60)

Inflector used to resolve layout script

  • access: protected
bool $_inflectorEnabled = true (line 66)

Flag: is inflector enabled?

  • access: protected
string $_inflectorTarget = ':script.:suffix' (line 72)

Inflector target

  • access: protected
string $_layout = 'layout' (line 78)

Layout view

  • access: protected
bool $_mvcEnabled = true (line 93)

Flag: is MVC integration enabled?

  • access: protected
bool $_mvcSuccessfulActionOnly = true (line 105)

Flag: is MVC successful action only flag set?

  • access: protected
string $_pluginClass = 'Zend_Layout_Controller_Plugin_Layout' (line 111)

Plugin class

  • access: protected
Zend_View_Interface $_view (line 116)
  • access: protected
mixed $_viewBasePath = null (line 86)
  • access: protected
mixed $_viewBasePrefix = 'Layout_View' (line 87)
  • access: protected
string $_viewScriptPath = null (line 84)

Layout view script path

  • access: protected
string $_viewSuffix = 'phtml' (line 122)

View script suffix for layout script

  • access: protected
Methods
static getMvcInstance (line 189)

Retrieve MVC instance of Zend_Layout object

  • access: public
static Zend_Layout|null getMvcInstance ()
static resetMvcInstance (line 201)

Reset MVC instance

Unregisters plugins and helpers, and destroys MVC layout instance.

  • access: public
static void resetMvcInstance ()
static startMvc (line 173)

Static method for initialization with MVC support

  • access: public
static Zend_Layout startMvc ([string|array|Zend_Config $options = null])
Constructor __construct (line 142)

Constructor

Accepts either:

  • A string path to layouts
  • An array of options
  • A Zend_Config object with options
Layout script path, either as argument or as key in options, is required.

If mvcEnabled flag is false from options, simply sets layout script path. Otherwise, also instantiates and registers action helper and controller plugin.

  • access: public
void __construct ([string|array|Zend_Config $options = null], [ $initMvc = false])
assign (line 732)

Assign one or more layout variables

  • throws: Zend_Layout_Exception if non-array/string value passed to $spec
  • access: public
Zend_Layout assign (mixed $spec, [mixed $value = null])
  • mixed $spec: Assoc array or string key; if assoc array, sets each key as a layout variable
  • mixed $value: Value if $spec is a key
disableInflector (line 656)

Disable inflector

  • access: public
Zend_Layout disableInflector ()
disableLayout (line 348)

Disable layout

  • access: public
Zend_Layout disableLayout ()
enableInflector (line 645)

Enable inflector

  • access: public
Zend_Layout enableInflector ()
enableLayout (line 359)

Enable layout

  • access: public
Zend_Layout enableLayout ()
getContentKey (line 439)

Retrieve content key

  • access: public
string getContentKey ()
getHelperClass (line 505)

Retrieve helper class

  • access: public
string getHelperClass ()
getInflector (line 626)

Retrieve inflector

  • access: public
Zend_Filter_Inflector getInflector ()
getInflectorTarget (line 592)

Retrieve inflector target

  • access: public
string getInflectorTarget ()
getLayout (line 338)

Get current layout script

  • access: public
string getLayout ()
getLayoutPath (line 415)

Get current layout script path

  • access: public
string getLayoutPath ()
getMvcEnabled (line 461)

Retrieve MVC enabled flag

  • access: public
bool getMvcEnabled ()
getMvcSuccessfulActionOnly (line 483)

Get MVC Successful Action Only Flag

  • access: public
bool getMvcSuccessfulActionOnly ()
getPluginClass (line 527)

Retrieve plugin class

  • access: public
string getPluginClass ()
getView (line 552)

Get current view object

If no view object currently set, retrieves it from the ViewRenderer.

  • todo: Set inflector from view renderer at same time
  • access: public
Zend_View_Interface getView ()
getViewBasePath (line 383)
  • access: public
void getViewBasePath ()
getViewScriptPath (line 394)
  • access: public
void getViewScriptPath ()
getViewSuffix (line 582)

Retrieve layout view script suffix

  • access: public
string getViewSuffix ()
inflectorEnabled (line 667)

Return status of inflector enabled flag

  • access: public
bool inflectorEnabled ()
isEnabled (line 370)

Is layout enabled?

  • access: public
bool isEnabled ()
render (line 762)

Render layout

Sets internal script path as last path on script path stack, assigns layout variables to view, determines layout name using inflector, and renders layout view script.

$name will be passed to the inflector as the key 'script'.

  • access: public
mixed render ([mixed $name = null])
  • mixed $name
setConfig (line 297)

Set options from a config object

  • access: public
Zend_Layout setConfig ( $config)
setContentKey (line 428)

Set content key

Key in namespace container denoting default content

  • access: public
Zend_Layout setContentKey (string $contentKey)
  • string $contentKey
setHelperClass (line 516)

Set helper class

  • access: public
Zend_Layout setHelperClass (string $helperClass)
  • string $helperClass
setInflector (line 615)

Set inflector to use when resolving layout names

  • access: public
Zend_Layout setInflector ( $inflector)
setInflectorTarget (line 603)

Set inflector target

  • access: public
Zend_Layout setInflectorTarget (string $inflectorTarget)
  • string $inflectorTarget
setLayout (line 326)

Set layout script to use

Note: enables layout.

  • access: public
Zend_Layout setLayout (string $name)
  • string $name
setLayoutPath (line 405)

Set layout script path

  • access: public
Zend_Layout setLayoutPath (string $path)
  • string $path
setMvcSuccessfulActionOnly (line 472)

Set MVC Successful Action Only flag

  • access: public
Zend_Layout setMvcSuccessfulActionOnly (bool $successfulActionOnly)
  • bool $successfulActionOnly
setOptions (line 226)

Set options en masse

  • access: public
void setOptions (array $options)
  • array $options
setPluginClass (line 538)

Set plugin class

  • access: public
Zend_Layout setPluginClass (string $pluginClass)
  • string $pluginClass
setView (line 494)

Set view object

  • access: public
Zend_Layout setView ( $view)
setViewBasePath (line 376)
  • access: public
void setViewBasePath ( $path, [ $prefix = 'Layout_View'])
  • $path
  • $prefix
setViewScriptPath (line 388)
  • access: public
void setViewScriptPath ( $path)
  • $path
setViewSuffix (line 571)

Set layout view script suffix

  • access: public
Zend_Layout setViewSuffix (string $viewSuffix)
  • string $viewSuffix
_initHelper (line 280)

Initialize action helper

  • access: protected
void _initHelper ()
_initMvc (line 248)

Initialize MVC integration

  • access: protected
void _initMvc ()
_initPlugin (line 259)

Initialize front controller plugin

  • access: protected
void _initPlugin ()
_initVarContainer (line 308)

Initialize placeholder container for layout vars

  • access: protected
_setMvcEnabled (line 450)

Set MVC enabled flag

  • access: protected
Zend_Layout _setMvcEnabled (bool $mvcEnabled)
  • bool $mvcEnabled
__get (line 690)

Get layout variable

  • access: public
mixed __get (string $key)
  • string $key
__isset (line 705)

Is a layout variable set?

  • access: public
bool __isset (string $key)
  • string $key
__set (line 679)

Set layout variable

  • access: public
void __set (string $key, mixed $value)
  • string $key
  • mixed $value
__unset (line 716)

Unset a layout variable?

  • access: public
void __unset (string $key)
  • string $key

Documentation generated on Mon, 25 Aug 2008 23:59:59 +0400 by phpDocumentor 1.4.1