From 2f6b18c388b9ea5229ad6d37b4aec8d701d99753 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Fri, 26 Dec 2014 00:38:03 +0200 Subject: [PATCH] register all apps in container by slug --- ipf/auth/app.php | 1 - ipf/project.php | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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; } -- 2.49.0