- Automate selection and rendering of layouts.
- Provide different scope for layout related variables and content.eg render(), partial().
- Allow configuration, including layout name, layout script resolution (inflection), and layout.
- You can disable layouts, changing layout scripts, and other states; allow these actions from within action controllers and view scripts.
- Follow same script resolution rules (inflection) as the ViewRenderer.
//static method
Zend_Layout::startMvc($optionArray)
Zend_Layout::startMvc($optionIniObject)
//constructor
$layout = Zend_Layout($optionArray);
$layout = Zend_Layout($optionIniObject);
//methods
$layout = Zend_Layout();
$layout->setOptions($optionArray);
$layout->setOptions($optionIniObject);
//using accessors
$ayout->setLayout('layout)
->setLayoutPath('/views/layouts/mylayout.phtml');
You can use Zend_Layout as an standalone component but in that case all full features will not available. following are available.
Scoping of layout.
isolation of layout view scripts from another view scripts.
No comments:
Post a Comment
Please add comments only related to zend framework certification.