I continued Zend learning with 3rd page of Zend documentation. It is about creating Layout. In this section, I saw mention about two design patterns about Layout. This layout section introduced one more command:
C:\xampp\htdocs\ZendFramework\demos>C:\xampp\htdocs\ZendFramework\bin\zf.bat enable layout
This was giving error.
An Error Has Occurred
Action 'enable' is not a valid action.
The above error is coming to all XAMPP user as I read in comments submitted by users there. Xampp comes with it own Zend library. So, I got to rename that for making the above command work.
One comment says that you need to add PATH in window to C:\xampp\php. But, this I have done in previous chapter. So, I have tried with renaming the Zend version of PEAR at C:\xampp\php\PEAR and it is working fine. Now, check the '
zf show version' command again. The output should be different.
What if, I run
zf enable layout again! Can zend check that layout already exist and give me option or warn me? No, it did not. Instead it overwritten the layout.phtml and created duplicate entry in
application.ini for layout (resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"). It is not perfect.
While learning, I was thinking - Is this learning will be of any use? or I will just learn and forget it and letter some another framework will come and my employer will expect me to know that!