From f5ebc168ac2a62b4f361c5a7d6636cd73644ce3b Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sun, 14 Sep 2014 09:39:28 +0300 Subject: [PATCH] configure application --- ipf.php | 2 +- ipf/application.php | 7 +++++++ ipf/project.php | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ipf.php b/ipf.php index 57d8f96..4e1fba6 100644 --- a/ipf.php +++ b/ipf.php @@ -7,7 +7,7 @@ final class IPF return '0.5 beta'; } - private static $settings = array( + public static $settings = array( 'app_base' => '', 'debug' => false, 'media_url' => '/media/', diff --git a/ipf/application.php b/ipf/application.php index 1fe3efe..911ed62 100644 --- a/ipf/application.php +++ b/ipf/application.php @@ -33,6 +33,13 @@ abstract class IPF_Application return strtolower($e[count($e)-1]); } + /** + * Configures application + */ + public function configure($settings) + { + } + /** * Returns CLI commands * diff --git a/ipf/project.php b/ipf/project.php index ff9c303..9bf307d 100644 --- a/ipf/project.php +++ b/ipf/project.php @@ -20,6 +20,7 @@ final class IPF_Project foreach (IPF::get('applications') as $name) { $className = $name.'_App'; $this->apps[$name] = new $className; + $this->apps[$name]->configure(IPF::$settings); } $this->router = new IPF_Router; } -- 2.49.0