示例#1
0
 protected function request(Sabel_Request $request, $session = null, $maxRedirects = 0)
 {
     if ($session === null) {
         $session = Sabel_Session_InMemory::create();
     }
     Sabel_Cookie_Factory::create()->set($session->getName(), $session->getId());
     if ($maxRedirects > 0) {
         return $this->requestWithRedirect($request, $session, $maxRedirects);
     } else {
         $bus = new Sabel_Bus();
         $bus->set("request", $request);
         $bus->set("session", $session);
         $bus->run(new Config_Bus());
         return $bus->get("response");
     }
 }