From: Andrey Kutejko Date: Thu, 25 Dec 2014 22:38:03 +0000 (+0200) Subject: register all apps in container by slug X-Git-Tag: 0.6~112 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=2f6b18c388b9ea5229ad6d37b4aec8d701d99753;p=ipf.git register all apps in container by slug --- diff --git a/ipf/auth/app.php b/ipf/auth/app.php index f4121b3..95c24d5 100644 --- a/ipf/auth/app.php +++ b/ipf/auth/app.php @@ -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() diff --git a/ipf/project.php b/ipf/project.php index 1d67892..ab3a4df 100644 --- a/ipf/project.php +++ b/ipf/project.php @@ -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; }