Implementation of Composer. Now fully works
This commit is contained in:
parent
4f0f3e74d5
commit
b2aea986c3
|
@ -31,6 +31,9 @@ class Core {
|
|||
// Load core functionality
|
||||
$this->loadStartupFiles();
|
||||
|
||||
// Load Composer
|
||||
$this->loadComposer();
|
||||
|
||||
$this->mods->modules->buildRegister();
|
||||
$this->mods->events->buildEventRegister();
|
||||
|
||||
|
@ -93,6 +96,17 @@ class Core {
|
|||
return $this->mods->modules->addModule($moduleInfo_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load composer if it is present
|
||||
* @access private
|
||||
* @param String directory of composer autoload file (optional)
|
||||
*/
|
||||
private function loadComposer($file = "vendor/autoload.php") {
|
||||
if (file_exists($file)) {
|
||||
require($file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.7.*"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue