예제 #1
0
파일: Addon.php 프로젝트: reoring/sabel
 public function execute(Sabel_Bus $bus)
 {
     $config = $bus->getConfig("addon");
     $addons = $config->configure();
     foreach ($addons as $addon) {
         $className = ucfirst($addon) . "_Addon";
         $instance = new $className();
         $instance->execute($bus);
     }
 }
예제 #2
0
 public function execute(Sabel_Bus $bus)
 {
     Sabel_Db_Config::initialize($bus->getConfig("database"));
     if (!is_cli() && ($session = $bus->get("session")) !== null) {
         $session->start();
         l("START SESSION: " . $session->getName() . "=" . $session->getId());
     }
     // default page title.
     if ($response = $bus->get("response")) {
         $response->setResponse("pageTitle", "Sabel");
     }
 }
예제 #3
0
 public function execute(Sabel_Bus $bus)
 {
     Sabel_Db_Config::initialize($bus->getConfig("database"));
     //Sabel::fileUsing(RUN_BASE . DS . LIB_DIR_NAME . DS . "db" . DS . "utility.php", true);
     if (!defined("SBL_BATCH")) {
         // start session.
         $session = $bus->get("session");
         $session->start();
         l("START SESSION: " . $session->getName() . "=" . $session->getId());
     }
     // default page title.
     $bus->get("response")->setResponse("pageTitle", "Sabel");
     // $request = $bus->get("request");
     // if ($request->isPost()) $this->trim($request);
 }
예제 #4
0
파일: Router.php 프로젝트: reoring/sabel
 public function execute(Sabel_Bus $bus)
 {
     $request = $bus->get("request");
     $config = $bus->getConfig("map");
     $config->configure();
     if ($candidate = $config->getValidCandidate($request->getUri())) {
         $request->setParameterValues(array_map("urldecode", $candidate->getUriParameters()));
         $destination = $candidate->getDestination();
         l("DESTINATION: " . $destination);
         $bus->set("destination", $destination);
         Sabel_Context::getContext()->setCandidate($candidate);
     } else {
         $message = __METHOD__ . "() didn't match to any routing configuration.";
         throw new Sabel_Exception_Runtime($message);
     }
 }