I’m trying to learn the Zend Framework, my first framework, and I came across the View section. In order to out put stuff from the controller to the view, I have to use short tags. I don’t want to do this because of XML. The only option, I’ve found so far, is $view->setUseStreamWrapper(true) which apparently kills performance. I was wondering if there is any alternative solutions (other than $view->setUseStreamWrapper(true))?
Thank you in advance.
Sorry here’s a clarification:
application/views/scripts/index/index.phtml
`Escape($this->name);?> from Zend Framework
Instead of , I want to use the long tags <?=$this->Escape($this->name);?><?php= $this->Escape($this->name);?>. But it doesn’t seem to work. Zend framework forces us to use short tags no?
I am not exactly sure what you are asking, but you do not have to use short tags, you can use long ones. You can also use short tags without using
$view->setUseStreamWrapper(true), you simply need to turn on short tags in your php.ini (you may also be able to set it in your script, but I am not sure) I believe all$view->setUseStreamWrapper(true)does is pre parse your script and turn<?into<?php.As for performance degradation, it was my experience that the ZF was slow no matter what you do. It seems the Zend people put a TON of stuff in the framework that has no business being in there, it seems that it is just a huge beast that tries to do everything, and so it end up doing it all poorly. Could just be me though.