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); } }
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"); } }
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); }
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); } }