]> git.andy128k.dev Git - ipf.git/commitdiff
configure application
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 14 Sep 2014 06:39:28 +0000 (09:39 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 14 Sep 2014 06:39:28 +0000 (09:39 +0300)
ipf.php
ipf/application.php
ipf/project.php

diff --git a/ipf.php b/ipf.php
index 57d8f969995ee6a0c939665790c827b0f39eb454..4e1fba6ed396732ce3dc22ddb295f8788f00253f 100644 (file)
--- 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/',
index 1fe3efe67725db45c75ac64f997c3c3ea3bade6b..911ed62b5f9ddf1c1b420cc972e4e28798efab1f 100644 (file)
@@ -33,6 +33,13 @@ abstract class IPF_Application
         return strtolower($e[count($e)-1]);
     }
 
+    /**
+     * Configures application
+     */
+    public function configure($settings)
+    {
+    }
+
     /**
      * Returns CLI commands
      *
index ff9c303d9a5240b2819b4771f61237ada63957ee..9bf307ddf4520c1c3929a319a027e95ef2199d55 100644 (file)
@@ -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;
     }