Example #1
0
 protected function preProcess($r)
 {
     parent::preProcess($r);
     $this->model = $this->getModel();
     $this->options = array_merge(self::defaultOptions(), $this->getOptions());
 }
Example #2
0
 public static function bootstrap()
 {
     ErrorHandler::Init(__NAMESPACE__ . "\\ErrorHandler");
     self::loadConfig();
     if (array_key_exists("PATH_INFO", $_SERVER) && $_SERVER["PATH_INFO"]) {
         Rest::handle();
     }
     $conf = Config::getInstance();
     $tpt = new TemplateRes(array("title" => $conf->get("title", "CF " . CF_VERSION), "description" => $conf->get("description", null), "favicon" => $conf->get("favicon", null)));
     foreach (Plugins::dispatchAll("index", $tpt) as $index) {
         if ($index !== null) {
             $tpt->output($index);
         }
     }
     return $tpt;
 }