]> git.andy128k.dev Git - ipf.git/commitdiff
register all apps in container by slug
authorAndrey Kutejko <andy128k@gmail.com>
Thu, 25 Dec 2014 22:38:03 +0000 (00:38 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Thu, 25 Dec 2014 22:38:03 +0000 (00:38 +0200)
ipf/auth/app.php
ipf/project.php

index f4121b310e9ee6c751a58c73c4d892ebd6c951ff..95c24d517168942cb69cadc62f7721257c853e05 100644 (file)
@@ -7,7 +7,6 @@ class IPF_Auth_App extends IPF_Application
     function configure($settings)
     {
         $this->userModel = $settings->get('auth_user_model', 'IPF\\Auth\\User');
-        \PFF\Container::set('auth', $this);
     }
 
     function getTitle()
index 1d678922cf393ed5e4263476184f3845972f5cdd..ab3a4df73d2dcf506c3dfea6978d8842df36461a 100644 (file)
@@ -19,8 +19,11 @@ final class IPF_Project
     {
         foreach (IPF::get('applications') as $name) {
             $className = $name.'_App';
-            $this->apps[$name] = new $className;
-            $this->apps[$name]->configure(IPF::$settings);
+            $app = new $className;
+            $app->configure(IPF::$settings);
+
+            $this->apps[$name] = $app;
+            \PFF\Container::set($app->slug(), $app);
         }
         $this->router = new IPF_Router;
     }