Created
November 13, 2013 09:54
-
-
Save bognerf/7446473 to your computer and use it in GitHub Desktop.
index.php für ZF2 (mit Custom Namespace im Vendor-Verzeichnis durch Autoloader!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
chdir(dirname(__DIR__)); | |
// Decline static file requests back to the PHP built-in webserver | |
if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) { | |
return false; | |
} | |
// Setup autoloading | |
require 'init_autoloader.php'; | |
//Loading the UR-Namespace in APPLICATION/vendor | |
Zend\Loader\AutoloaderFactory::factory(array('Zend\Loader\StandardAutoloader' => array( | |
'namespaces' => array( | |
'ur' => dirname(__DIR__) . '/vendor/ur', | |
) | |
))); | |
// Run the application! | |
Zend\Mvc\Application::init(require 'config/application.config.php')->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment