Skip to content

Commit

Permalink
Merge pull request #38 from onysko/master
Browse files Browse the repository at this point in the history
Fixed modules loading
  • Loading branch information
vitalyiegorov committed Apr 4, 2016
2 parents e9449e4 + 5764bf3 commit f4f594a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,16 @@ public function composer($dependencyFilePath = null)

$localModulesPath = '../src';
ResourceMap::get('cache');
$resourceMap = ResourceMap::get($localModulesPath);

foreach ($resourceMap->modules as $moduleFile) {
$modulePath = str_replace(realpath($localModulesPath), '', $moduleFile[1]);
$modulePath = explode('/', $modulePath);
$modulePath = $localModulesPath.'/'.$modulePath[1];
$this->load($modulePath, $parameters);
// TODO: Nested modules relation
for ($i = 0; $i < 2; $i++) {
$resourceMap = ResourceMap::get($localModulesPath);

foreach ($resourceMap->modules as $moduleFile) {
$modulePath = str_replace(realpath($localModulesPath), '', $moduleFile[1]);
$modulePath = explode('/', $modulePath);
$modulePath = $localModulesPath . '/' . $modulePath[1];
$this->load($modulePath, $parameters);
}
}

// Create local module and set it as active
Expand Down

0 comments on commit f4f594a

Please sign in to comment.