Pages

Tuesday, October 25, 2011

Bootstrap Class

What is the role of bootstrap?

Bootstrap class defines what resources and component has to be initialized while loading the zend application.
By default front_controller is initialized.

How to use Doctype resource in zend?

- To use this doctype resource in the application we have to define doctype using view resource in the bootstrap class like


protected function _initDoctype()
{
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
}


Now use at the top given line in the layout.phtml file. 
  echo $this->doctype() ?> 


No comments:

Post a Comment