Provide Layout support for MVC applications
category | Zend |
---|---|
package | Zend_Layout |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(string|array|\Zend_Config $options= null
, $initMvc= false
) : void
Accepts either:
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.
string
array
\Zend_Config
__get(string $key) : mixed
string
mixed
__isset(string $key) : boolean
string
boolean
__set(string $key, mixed $value) : void
string
mixed
__unset(string $key) : void
string
assign(mixed $spec, mixed $value = null
) : \Zend_Layout
mixed
Assoc array or string key; if assoc array, sets each key as a layout variable
mixed
Value if $spec is a key
\Zend_Layout_Exception |
if non-array/string value passed to $spec |
---|
\Zend_Layout
disableInflector() : \Zend_Layout
\Zend_Layout
disableLayout() : \Zend_Layout
\Zend_Layout
enableInflector() : \Zend_Layout
\Zend_Layout
enableLayout() : \Zend_Layout
\Zend_Layout
getContentKey() : string
string
getHelperClass() : string
string
getInflector() : \Zend_Filter_Inflector
\Zend_Filter_Inflector
getInflectorTarget() : string
string
getLayout() : string
string
getLayoutPath() : string
string
getMvcEnabled() : boolean
boolean
getMvcInstance() : \Zend_Layout | null
\Zend_Layout
null
getMvcSuccessfulActionOnly() : boolean
boolean
getPluginClass() : string
string
getView() : \Zend_View_Interface
If no view object currently set, retrieves it from the ViewRenderer.
todo | Set inflector from view renderer at same time |
---|
\Zend_View_Interface
getViewBasePath()
getViewScriptPath()
getViewSuffix() : string
string
inflectorEnabled() : boolean
boolean
isEnabled() : boolean
boolean
render(mixed $name = null
) : mixed
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'.
mixed
mixed
resetMvcInstance() : void
Unregisters plugins and helpers, and destroys MVC layout instance.
setConfig(\Zend_Config $config) : \Zend_Layout
\Zend_Config
\Zend_Layout
setContentKey(string $contentKey) : \Zend_Layout
Key in namespace container denoting default content
string
\Zend_Layout
setHelperClass(string $helperClass) : \Zend_Layout
string
\Zend_Layout
setInflector(\Zend_Filter_Inflector $inflector) : \Zend_Layout
\Zend_Filter_Inflector
\Zend_Layout
setInflectorTarget(string $inflectorTarget) : \Zend_Layout
string
\Zend_Layout
setLayout(string $name, boolean $enabled = true
) : \Zend_Layout
Note: enables layout by default, can be disabled
string
boolean
\Zend_Layout
setLayoutPath(string $path) : \Zend_Layout
string
\Zend_Layout
setMvcSuccessfulActionOnly(boolean $successfulActionOnly) : \Zend_Layout
boolean
\Zend_Layout
setOptions(array|\Zend_Config $options) : void
array
\Zend_Config
setPluginClass(string $pluginClass) : \Zend_Layout
string
\Zend_Layout
setView(\Zend_View_Interface $view) : \Zend_Layout
\Zend_View_Interface
\Zend_Layout
setViewBasePath($path, $prefix = 'Layout_View'
)
setViewScriptPath($path)
setViewSuffix(string $viewSuffix) : \Zend_Layout
string
\Zend_Layout
startMvc(string|array|\Zend_Config $options = null
) : \Zend_Layout
string
array
\Zend_Config
\Zend_Layout
_initHelper() : void
_initMvc() : void
_initPlugin() : void
_initVarContainer() : \Zend_View_Helper_Placeholder_Container
\Zend_View_Helper_Placeholder_Container
_setMvcEnabled(boolean $mvcEnabled) : \Zend_Layout
boolean
\Zend_Layout
$_container : \Zend_View_Helper_Placeholder_Container
$_contentKey : string
'content'
$_enabled : boolean
true
$_helperClass : string
'Zend_Layout_Controller_Action_Helper_Layout'
$_inflector : \Zend_Filter_Inflector
$_inflectorEnabled : boolean
true
$_inflectorTarget : string
':script.:suffix'
$_layout : string
'layout'
$_mvcEnabled : boolean
true
$_mvcInstance : \Zend_Layout
$_mvcSuccessfulActionOnly : boolean
true
$_pluginClass : string
'Zend_Layout_Controller_Plugin_Layout'
$_view : \Zend_View_Interface
$_viewBasePath
null
$_viewBasePrefix
'Layout_View'
$_viewScriptPath : string
null
$_viewSuffix : string
'phtml'