That method has absolutely no relation at all to the view basepath. It is
also useless since you're not really doing anything at all with the request
object you instantiated. The front controller already lazily loads the same
class during dispatch.

The reason your application still works even without the basePath line in
the config is because the view renderer infers the location of the view
scripts from the controller directories defined by the front controller. If
your app seems to load faster, it might be because it doesn't have to load
the View resource plugin anymore after removing that line (can't really tell
without seeing the rest of the ini), or it might be an illusion caused by
APC being primed after your first run.


   -- Mon


On Sun, May 16, 2010 at 8:03 AM, Mike A <mik...@hotmail.co.uk> wrote:

> Why use resources.view.basePath = APPLICATION_PATH "/views" in an
> application configuration file?
>
> Placing the following code in global Bootstrap.php seems to do the same
> things - and more:
> protected function _initBaseUrl() {
>        $this->bootstrap("frontController");
>        $front=$this->getResource("frontController");
>        $request=new Zend_Controller_Request_Http();
>        $front->setRequest($request);
> }
>
> If I remove the resources.view.basePath from the configuration file it
> doesn't seem to make any difference - except for some reason I haven't
> worked out yet the application seems to load a bit faster.
>
> The project, which is for experimentation, uses multiple modules.
>
> TIA...
>
> Mike A.
>

Reply via email to