Implementation of Composer. Now fully works

This commit is contained in:
Abel Hoogeveen 2015-07-28 12:08:35 +02:00
parent 4f0f3e74d5
commit b2aea986c3
2 changed files with 22 additions and 0 deletions

View File

@ -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);
}
}
}

8
composer.json Normal file
View File

@ -0,0 +1,8 @@
{
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "4.7.*"
}
}