Basically, I'd want to use Composer auto-loader (for loading third-party libraries), but I want to continue using built-in mechanism for auto-loading in Zend 1.12
I added the following piece of code:
<?php // File path: index.php
// ...
$composerAutoloaderPaths = array(
'../vendor/autoload.php',
'../../common/vendor/autoload.php' // store common libraries used by multiple projects, currently that's working by adding the directory in set_include_path()
);
foreach($composerAutoloaderPaths as $composerAutoloaderPath)
{
if(file_exists($composerAutoloaderPath))
{
require_once $composerAutoloaderPath;
}
else
{
// handle the error gracefully
}
}
// ...
Also, I'm using Zend_Loader_Autoloader
like this:
<?php // File path: Bootstrap.php
// ...
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('Plugin_');
$autoloader->registerNamespace('Helper_');
// etc.
// ...
Is there something to worry about using Composer and Zend autoloaders like this?