Esempio n. 1
0
 /**
  * [set description]
  * @param [type] $value  [description]
  * @param array  $params [description]
  */
 public static function set($value, array $params)
 {
     $list = array('Errors', 'App', 'Loader', 'Dispatcher', 'Database', 'Routes');
     if (in_array($value, $list)) {
         switch ($value) {
             case 'Dispatcher':
                 require_once SYSPATH . 'routing/Dispatcher.php';
                 Dispatcher::configure($params);
                 break;
             case 'Loader':
                 require_once SYSPATH . 'loader/Loader.php';
                 Loader::configure($params);
                 break;
             case 'App':
                 require_once SYSPATH . 'config/App.php';
                 App::configure($params);
                 break;
             case 'Errors':
                 require_once SYSPATH . 'errors/Errors.php';
                 Errors::configure($params);
                 break;
             case 'Routes':
                 require_once SYSPATH . 'routing/Routes.php';
                 $r = new Routes();
                 $r->setCustomRoutes($params);
                 break;
             case 'Database':
                 // Database::configure( $params );
                 break;
         }
     } else {
         exit('Error');
     }
 }
Esempio n. 2
0
 /**
  * [getResponse description]
  * @return array [description]
  */
 public function getResponse()
 {
     return array('controller' => $this->controller, 'method' => $this->method, 'path' => $this->path, 'class' => Loader::controller($this->controller));
 }
Esempio n. 3
0
 public static function configure(array $params)
 {
     extract($params);
     foreach ($libraries as $key => $value) {
         Loader::library($value);
     }
 }