mode = ucfirst($mode); $clazz = $this->prefix . $this->mode; if (!class_exists($clazz)) { die('Wrong parameter'); } $this->action = new $clazz(); } /** * @return string content */ public function fetch() { if (!($this->action instanceof ZAPHandler)) { die('Handler does not implement ZAPHandler interface'); } return $this->action->getContent(); } } ?>