From d4a24c11a407496b78c77e32514e189ad77cc551 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sat, 16 Mar 2019 20:28:41 +0100 Subject: [PATCH] lazily get apps --- src/app.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app.php b/src/app.php index 9b63028..2e574cb 100644 --- a/src/app.php +++ b/src/app.php @@ -2,12 +2,12 @@ class IPF_Legacy_ORM_App extends IPF_Application { - private $apps; + private $container; private $project_root; public function configure(\Pimple\Container $container) { - $this->apps = $container['apps']; + $this->container = $container; $this->project_root = $container['settings']->get('project_root'); } @@ -36,11 +36,12 @@ class IPF_Legacy_ORM_App extends IPF_Application public function commands() { + $apps = $this->container['apps']; return array( - new IPF_Legacy_ORM_Command_BuildModels($this->apps), - new IPF_Legacy_ORM_Command_Sql($this->apps), - new IPF_Legacy_ORM_Command_SyncDB($this->apps), - new IPF_Legacy_ORM_Command_Fixtures($this->apps, $this->project_root . DIRECTORY_SEPARATOR . 'project'), + new IPF_Legacy_ORM_Command_BuildModels($apps), + new IPF_Legacy_ORM_Command_Sql($apps), + new IPF_Legacy_ORM_Command_SyncDB($apps), + new IPF_Legacy_ORM_Command_Fixtures($apps, $this->project_root . DIRECTORY_SEPARATOR . 'project'), ); } } -- 2.49.0