I'm a beginner in Zend Framework and I find it hard to understand their documentation. The only PHP Framework I have used was CodeIgniter.
I am used to this method in utilizing libraries:
//load the My_Library class and assign the object to $this->myLibrary property
$this->load->library('my_Library'); //CodeIgniter way
public function index()
{
$this->my_Library->method(); //make use of the methods in the loaded library
}
So far I'm figuring out how this code works in zend, say in the bootstrap class:
protected function _initSetDoctype()
{
$doctypeHelper = new Zend_View_Helper_Doctype();
$doctypeHelper->doctype('XHTML1_STRICT');
}
And in the layout.phtml file we can put:
<?php echo $this->doctype() ?>
My question is: Since I have instantiated a new Zend_View_Helper_Doctype();
How did ZF assign $this->doctype
and made this available in view?
Is there some kind of storage where these values update the view object?
I'm trying to find out how the flow works in zend so I could have a better understanding on how to make use of its resources. Sorry for my English if it's hard to understand @_@ Thank you very much!