Yes, it's "sort of" redundant.
The fact of the matter is that there are two ways of "ZFifying" your
project.
You can create an application that expects ZendFramework to be on your
systems include_path (by system I mean the PHP environment governed by
/etc/php.ini or win32 equivilant.) This means that
ZendFramework/library files need not be inside your projects library
folder thus making your project code lighter, but with an external
dependency.
On the other hand, you can have ZendFramework's library/ files inside
your projects library/ file. This makes the project heavier file wise,
but also means its more portable as there are fewer external dependencies.
Both are valid, the question is a matter of how you plan to manage your
project/application and dependencies. More specifically, its up your
organizations goals.
public/index.php minimally needs to be able to find a
Zend_Loader_Autoloader. That is why you'll see the set_include_path()
in public/index.php. Mostly, this is there to give a new developer
every opportunity to have an out-of-the-box experience with Zend
Framework, and ZF based project.
You can remove the one in the application.ini if you are using the one
in the public/index.php as is.
-ralph
Ryan Lange wrote:
When you create a project with Zend_Tool, it appears to add library/ to
the include path twice; once in application/configs/application.ini and
again in public/index.php.
==========
application/configs/application.ini
==========
includePaths[] = APPLICATION_PATH "/../library"
==========
public/index.php
==========
set_include_path( implode( PATH_SEPARATOR, array(
realpath( APPLICATION_PATH . '/../library' ),
get_include_path(),
) ) );
Am I correct in assuming that this is simply redundant?