projects
/
zf2.biz
/
application_blanche.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4743008
)
Add conditional check for allowing ZF2_PATH env variable to be used
author
Evan Coury
<me@evancoury.com>
Wed, 13 Jun 2012 16:43:51 +0000
(09:43 -0700)
committer
Evan Coury
<me@evancoury.com>
Wed, 13 Jun 2012 16:43:51 +0000
(09:43 -0700)
public/index.php
patch
|
blob
|
history
diff --git
a/public/index.php
b/public/index.php
index
ece1222
..
6685f6f
100644
(file)
--- a/
public/index.php
+++ b/
public/index.php
@@
-1,9
+1,16
@@
<?php
<?php
-use Zend\ServiceManager\ServiceManager,
- Zend\Mvc\Service\ServiceManagerConfiguration;
+use Zend\Loader\AutoloaderFactory;
+use Zend\ServiceManager\ServiceManager;
+use Zend\Mvc\Service\ServiceManagerConfiguration;
chdir(dirname(__DIR__));
chdir(dirname(__DIR__));
+// Allow using an alternative copy of ZF2
+if (getenv('ZF2_PATH')) {
+ require_once getenv('ZF2_PATH') . '/Zend/Loader/AutoloaderFactory.php';
+ AutoloaderFactory::factory();
+}
+
// Composer autoloading
if (!include_once('vendor/autoload.php')) {
throw new RuntimeException('vendor/autoload.php could not be found. Did you run `php composer.phar install`?');
// Composer autoloading
if (!include_once('vendor/autoload.php')) {
throw new RuntimeException('vendor/autoload.php could not be found. Did you run `php composer.phar install`?');