2008年9月23日星期二

Re: [fw-mvc] why setting the $bootstrap variable to TRUE in index.php?

-- Guillaume ORIOL <goriol@technema.fr> wrote
(on Friday, 12 September 2008, 06:01 PM +0200):
> The new quick start for ZF 1.6 explains how to create a public index.php
> file that will be the only entry point of the application.
> This file starts with:
>
> |<?php
> // Step 1: Set a flag indicating setup is necessary
> $bootstrap = true;

Actually, this has changed with 1.6.1. Please review the newly published
version.

> ...
>
> Then, the boostrap.php is described and an example is given that starts
> with:
>
> ||<?php
> // Step 1: Check to see if the applicaiton environment is already setup
> if (isset($bootstrap) && $bootstrap) {
> |...
>
> My question is:
> why setting a $bootstrap variable and testing it in the bootstrap file?
> As the index.php will be run at every request, the $bootstrap variable
> will always be true and the "if" section will always be executed.
>
> Did I miss something?

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: