Zend Framework
1.12
|
Public Member Functions | |
__construct ($options=null, $initMvc=false) | |
Constructor. | |
setOptions ($options) | |
Set options en masse. | |
setConfig (Zend_Config $config) | |
Set options from a config object. | |
setLayout ($name, $enabled=true) | |
Set layout script to use. | |
getLayout () | |
Get current layout script. | |
disableLayout () | |
Disable layout. | |
enableLayout () | |
Enable layout. | |
isEnabled () | |
Is layout enabled? | |
setViewBasePath ($path, $prefix= 'Layout_View') | |
getViewBasePath () | |
setViewScriptPath ($path) | |
getViewScriptPath () | |
setLayoutPath ($path) | |
Set layout script path. | |
getLayoutPath () | |
Get current layout script path. | |
setContentKey ($contentKey) | |
Set content key. | |
getContentKey () | |
Retrieve content key. | |
getMvcEnabled () | |
Retrieve MVC enabled flag. | |
setMvcSuccessfulActionOnly ($successfulActionOnly) | |
Set MVC Successful Action Only flag. | |
getMvcSuccessfulActionOnly () | |
Get MVC Successful Action Only Flag. | |
setView (Zend_View_Interface $view) | |
Set view object. | |
getHelperClass () | |
Retrieve helper class. | |
setHelperClass ($helperClass) | |
Set helper class. | |
getPluginClass () | |
Retrieve plugin class. | |
setPluginClass ($pluginClass) | |
Set plugin class. | |
getView () | |
Get current view object. | |
setViewSuffix ($viewSuffix) | |
Set layout view script suffix. | |
getViewSuffix () | |
Retrieve layout view script suffix. | |
getInflectorTarget () | |
Retrieve inflector target. | |
setInflectorTarget ($inflectorTarget) | |
Set inflector target. | |
setInflector (Zend_Filter_Inflector $inflector) | |
Set inflector to use when resolving layout names. | |
getInflector () | |
Retrieve inflector. | |
enableInflector () | |
Enable inflector. | |
disableInflector () | |
Disable inflector. | |
inflectorEnabled () | |
Return status of inflector enabled flag. | |
__set ($key, $value) | |
Set layout variable. | |
__get ($key) | |
Get layout variable. | |
__isset ($key) | |
Is a layout variable set? | |
__unset ($key) | |
Unset a layout variable? | |
assign ($spec, $value=null) | |
Assign one or more layout variables. | |
render ($name=null) | |
Render layout. | |
Static Public Member Functions | |
static | startMvc ($options=null) |
Static method for initialization with MVC support. | |
static | getMvcInstance () |
Retrieve MVC instance of Zend_Layout object. | |
static | resetMvcInstance () |
Reset MVC instance. | |
Protected Member Functions | |
_initMvc () | |
Initialize MVC integration. | |
_initPlugin () | |
Initialize front controller plugin. | |
_initHelper () | |
Initialize action helper. | |
_initVarContainer () | |
Initialize placeholder container for layout vars. | |
_setMvcEnabled ($mvcEnabled) | |
Set MVC enabled flag. | |
Protected Attributes | |
$_container | |
$_contentKey = 'content' | |
$_enabled = true | |
$_helperClass = 'Zend_Layout_Controller_Action_Helper_Layout' | |
$_inflector | |
$_inflectorEnabled = true | |
$_inflectorTarget = ':script.:suffix' | |
$_layout = 'layout' | |
$_viewScriptPath = null | |
$_viewBasePath = null | |
$_viewBasePrefix = 'Layout_View' | |
$_mvcEnabled = true | |
$_mvcSuccessfulActionOnly = true | |
$_pluginClass = 'Zend_Layout_Controller_Plugin_Layout' | |
$_view | |
$_viewSuffix = 'phtml' | |
Static Protected Attributes | |
static | $_mvcInstance |
__construct | ( | $options = null , |
|
$initMvc = false |
|||
) |
Constructor.
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 | $options |
__get | ( | $key | ) |
Get layout variable.
string | $key |
__isset | ( | $key | ) |
Is a layout variable set?
string | $key |
__set | ( | $key, | |
$value | |||
) |
Set layout variable.
string | $key | |
mixed | $value |
__unset | ( | $key | ) |
Unset a layout variable?
string | $key |
|
protected |
Initialize action helper.
|
protected |
Initialize MVC integration.
|
protected |
Initialize front controller plugin.
|
protected |
Initialize placeholder container for layout vars.
|
protected |
assign | ( | $spec, | |
$value = null |
|||
) |
Assign one or more layout variables.
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 |
Zend_Layout_Exception | if non-array/string value passed to $spec |
disableInflector | ( | ) |
Disable inflector.
disableLayout | ( | ) |
Disable layout.
enableInflector | ( | ) |
Enable inflector.
enableLayout | ( | ) |
Enable layout.
getContentKey | ( | ) |
Retrieve content key.
getHelperClass | ( | ) |
Retrieve helper class.
getInflector | ( | ) |
Retrieve inflector.
getInflectorTarget | ( | ) |
Retrieve inflector target.
getLayout | ( | ) |
Get current layout script.
getLayoutPath | ( | ) |
Get current layout script path.
getMvcEnabled | ( | ) |
Retrieve MVC enabled flag.
|
static |
Retrieve MVC instance of Zend_Layout object.
getMvcSuccessfulActionOnly | ( | ) |
Get MVC Successful Action Only Flag.
getPluginClass | ( | ) |
Retrieve plugin class.
getView | ( | ) |
Get current view object.
If no view object currently set, retrieves it from the ViewRenderer.
getViewBasePath | ( | ) |
getViewScriptPath | ( | ) |
getViewSuffix | ( | ) |
Retrieve layout view script suffix.
inflectorEnabled | ( | ) |
Return status of inflector enabled flag.
isEnabled | ( | ) |
Is layout enabled?
render | ( | $name = null | ) |
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'.
mixed | $name |
|
static |
Reset MVC instance.
Unregisters plugins and helpers, and destroys MVC layout instance.
setConfig | ( | Zend_Config | $config | ) |
setContentKey | ( | $contentKey | ) |
Set content key.
Key in namespace container denoting default content
string | $contentKey |
setHelperClass | ( | $helperClass | ) |
setInflector | ( | Zend_Filter_Inflector | $inflector | ) |
Set inflector to use when resolving layout names.
Zend_Filter_Inflector | $inflector |
setInflectorTarget | ( | $inflectorTarget | ) |
setLayout | ( | $name, | |
$enabled = true |
|||
) |
Set layout script to use.
Note: enables layout by default, can be disabled
string | $name | |
boolean | $enabled |
setLayoutPath | ( | $path | ) |
setMvcSuccessfulActionOnly | ( | $successfulActionOnly | ) |
setOptions | ( | $options | ) |
setPluginClass | ( | $pluginClass | ) |
setView | ( | Zend_View_Interface | $view | ) |
setViewBasePath | ( | $path, | |
$prefix = 'Layout_View' |
|||
) |
setViewScriptPath | ( | $path | ) |
setViewSuffix | ( | $viewSuffix | ) |
|
static |
Static method for initialization with MVC support.
string | array | Zend_Config | $options |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |