Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Provide Layout support for MVC applications
Zend_View_Helper_Placeholder_Container $_container = ''Placeholder container for layout variables
Detailsstring $_contentKey = 'content'Key used to store content from 'default' named response segment
Detailsbool $_enabled = 'true'Are layouts enabled?
Detailsstring $_helperClass = 'Zend_Layout_Controller_Action_Helper_Layout'Helper class
DetailsZend_Filter_Inflector $_inflector = ''Inflector used to resolve layout script
Detailsbool $_inflectorEnabled = 'true'Flag: is inflector enabled?
Detailsstring $_inflectorTarget = ':script.:suffix'Inflector target
Detailsstring $_layout = 'layout'Layout view
Detailsbool $_mvcEnabled = 'true'Flag: is MVC integration enabled?
DetailsZend_Layout $_mvcInstance = ''Instance registered with MVC, if any
Detailsbool $_mvcSuccessfulActionOnly = 'true'Flag: is MVC successful action only flag set?
Detailsstring $_pluginClass = 'Zend_Layout_Controller_Plugin_Layout'Plugin class
DetailsZend_View_Interface $_view = ''
Details $_viewBasePath = 'null'
Details $_viewBasePrefix = 'Layout_View'
Detailsstring $_viewScriptPath = 'null'Layout view script path
Detailsstring $_viewSuffix = 'phtml'View script suffix for layout script
Details__construct(
string|array|Zend_Config $options
=
null, $initMvc
=
false
)
:
voidConstructor
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.
Details__get(
string $key
)
:
mixedGet layout variable
Details__isset(
string $key
)
:
boolIs a layout variable set?
Details__set(
string $key, mixed $value
)
:
voidSet layout variable
Details__unset(
string $key
)
:
voidUnset a layout variable?
Details_initHelper(
)
:
voidInitialize action helper
Details_initMvc(
)
:
voidInitialize MVC integration
Details_initPlugin(
)
:
voidInitialize front controller plugin
Details_initVarContainer(
)
:
Zend_View_Helper_Placeholder_ContainerInitialize placeholder container for layout vars
Details_setMvcEnabled(
bool $mvcEnabled
)
:
Zend_LayoutSet MVC enabled flag
Detailsassign(
mixed $spec, mixed $value
=
null
)
:
Zend_LayoutAssign one or more layout variables
DetailsdisableInflector(
)
:
Zend_LayoutDisable inflector
DetailsdisableLayout(
)
:
Zend_LayoutDisable layout
DetailsenableInflector(
)
:
Zend_LayoutEnable inflector
DetailsenableLayout(
)
:
Zend_LayoutEnable layout
DetailsgetContentKey(
)
:
stringRetrieve content key
DetailsgetHelperClass(
)
:
stringRetrieve helper class
DetailsgetInflector(
)
:
Zend_Filter_InflectorRetrieve inflector
DetailsgetInflectorTarget(
)
:
stringRetrieve inflector target
DetailsgetLayout(
)
:
stringGet current layout script
DetailsgetLayoutPath(
)
:
stringGet current layout script path
DetailsgetMvcEnabled(
)
:
boolRetrieve MVC enabled flag
DetailsgetMvcInstance(
)
:
Zend_Layout|nullRetrieve MVC instance of Zend_Layout object
DetailsgetMvcSuccessfulActionOnly(
)
:
boolGet MVC Successful Action Only Flag
DetailsgetPluginClass(
)
:
stringRetrieve plugin class
DetailsgetView(
)
:
Zend_View_InterfaceGet current view object
If no view object currently set, retrieves it from the ViewRenderer.
DetailsgetViewBasePath(
)
:
DetailsgetViewScriptPath(
)
:
DetailsgetViewSuffix(
)
:
stringRetrieve layout view script suffix
DetailsinflectorEnabled(
)
:
boolReturn status of inflector enabled flag
DetailsisEnabled(
)
:
boolIs layout enabled?
Detailsrender(
mixed $name
=
null
)
:
mixedRender 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'.
DetailsresetMvcInstance(
)
:
voidReset MVC instance
Unregisters plugins and helpers, and destroys MVC layout instance.
DetailssetConfig(
Zend_Config $config
)
:
Zend_LayoutSet options from a config object
DetailssetContentKey(
string $contentKey
)
:
Zend_LayoutSet content key
Key in namespace container denoting default content
DetailssetHelperClass(
string $helperClass
)
:
Zend_LayoutSet helper class
DetailssetInflector(
Zend_Filter_Inflector $inflector
)
:
Zend_LayoutSet inflector to use when resolving layout names
DetailssetInflectorTarget(
string $inflectorTarget
)
:
Zend_LayoutSet inflector target
DetailssetLayout(
string $name, boolean $enabled
=
true
)
:
Zend_LayoutSet layout script to use
Note: enables layout by default, can be disabled
DetailssetLayoutPath(
string $path
)
:
Zend_LayoutSet layout script path
DetailssetMvcSuccessfulActionOnly(
bool $successfulActionOnly
)
:
Zend_LayoutSet MVC Successful Action Only flag
DetailssetOptions(
array|Zend_Config $options
)
:
voidSet options en masse
DetailssetPluginClass(
string $pluginClass
)
:
Zend_LayoutSet plugin class
DetailssetView(
Zend_View_Interface $view
)
:
Zend_LayoutSet view object
DetailssetViewBasePath(
$path, $prefix
=
Layout_View
)
:
DetailssetViewScriptPath(
$path
)
:
DetailssetViewSuffix(
string $viewSuffix
)
:
Zend_LayoutSet layout view script suffix
DetailsstartMvc(
string|array|Zend_Config $options
=
null
)
:
Zend_LayoutStatic method for initialization with MVC support
Details