Created
July 10, 2012 23:11
-
-
Save stof/3086842 to your computer and use it in GitHub Desktop.
suggestion to use the composer autoloader for PPI
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 | |
/** | |
* @author Paul Dragoonis <[email protected]> | |
* @license http://opensource.org/licenses/mit-license.php MIT | |
* @package PPI | |
* @link www.ppi.io | |
*/ | |
defined('PPI_VERSION') || define('PPI_VERSION', '2.0'); | |
defined('DS') || define('DS', DIRECTORY_SEPARATOR); | |
defined('PPI_PATH') || define('PPI_PATH', realpath(__DIR__) . '/'); | |
defined('PPI_VENDOR_PATH') || define('PPI_VENDOR_PATH', dirname(PPI_PATH) . '/vendor/'); | |
$composerPath = PPI_PATH . '/vendor/autoload.php'; | |
if (!file_exists($composerPath)) { | |
die('Unable to find composer generated file at: ' . $composerPath); | |
} | |
// Composer generated file include | |
$loader = require 'vendor/autoload.php'; | |
// Adding PPI autoloader so modules may add themself to the autoload process on-the-fly | |
PPI\Autoload::config(array( | |
'loader' => $loader, | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment