Example #1
0
 protected function determineMethod($resource, $r)
 {
     if ('post' == $r->method) {
         $method = 'postTo';
     } else {
         $method = $r->method;
     }
     if ('html' == $r->format || 'get' != $r->method) {
         $format = '';
     } else {
         $format = ucfirst($r->format);
     }
     //camel case
     $resource = Dase_Util::camelize($resource);
     $handler_method = $method . $resource . $format;
     return $handler_method;
 }
Example #2
0
 public function getHandlerObject()
 {
     $classname = $this->initModule($this->config);
     if (!$classname) {
         $classname = 'Dase_Handler_' . Dase_Util::camelize($this->handler);
     }
     if (class_exists($classname, true)) {
         return new $classname($this->db, $this->config);
     } else {
         Dase_Log::info(LOG_FILE, 'no such handler class ' . $classname . ' redirecting');
         $this->renderRedirect($this->default_handler);
     }
 }
Example #3
0
 public function getHandlerObject()
 {
     $classname = 'Dase_Handler_' . Dase_Util::camelize($this->handler);
     if (class_exists($classname, true)) {
         return new $classname($this->db, $this->config);
     } else {
         $this->renderRedirect($this->default_handler);
     }
 }