Skip to content

Commit

Permalink
add service procider
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggngyv committed Jul 2, 2017
1 parent 28832fd commit c627d79
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"zendframework/zend-diactoros": "^1.3",
"symfony/yaml": "~2.7",
"symfony/console": "^3.1",
"opis/session": "^3.1",,
"opis/session": "^3.1",
"dmitrymomot/cookie-helper": "^1.0",
"fzaninotto/faker": "^1.6",
"creitive/breadcrumbs": "^3.1",
Expand Down
8 changes: 8 additions & 0 deletions core/lib/Hunter/App/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ protected function initializeContainer() {
}
}
}

if(!empty($services['providers'])){
foreach ($services['providers'] as $name => $provider) {
if (class_exists($provider['class'])) {
$container->addServiceProvider($provider['class']);
}
}
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions sites/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//配置: 开发模式
$hunter_debug = true;

//配置: 缓存目录
$cache_dir = HUNTER_ROOT . '/sites/files';

//配置: 数据库
$databases = array(
'default' => array(
Expand Down

0 comments on commit c627d79

Please sign in to comment.