From: Andrey Kutejko Date: Sun, 14 Sep 2014 06:39:28 +0000 (+0300) Subject: configure application X-Git-Tag: 0.6~140 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=f5ebc168ac2a62b4f361c5a7d6636cd73644ce3b;p=ipf.git configure application --- 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; }