summaryrefslogtreecommitdiff
path: root/app/ServiceProvider/ClassProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/ServiceProvider/ClassProvider.php')
-rw-r--r--app/ServiceProvider/ClassProvider.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/app/ServiceProvider/ClassProvider.php b/app/ServiceProvider/ClassProvider.php
index b570f5cf..53bddc1b 100644
--- a/app/ServiceProvider/ClassProvider.php
+++ b/app/ServiceProvider/ClassProvider.php
@@ -4,6 +4,7 @@ namespace ServiceProvider;
use Core\Paginator;
use Core\OAuth2;
+use Core\Tool;
use Model\Config;
use Model\Project;
use Model\Webhook;
@@ -94,17 +95,7 @@ class ClassProvider implements ServiceProviderInterface
public function register(Container $container)
{
- foreach ($this->classes as $namespace => $classes) {
-
- foreach ($classes as $name) {
-
- $class = '\\'.$namespace.'\\'.$name;
-
- $container[lcfirst($name)] = function ($c) use ($class) {
- return new $class($c);
- };
- }
- }
+ Tool::buildDIC($container, $this->classes);
$container['paginator'] = $container->factory(function ($c) {
return new Paginator($c);