コード例 #1
0
ファイル: Edit.class.php プロジェクト: rolwi/koala
 public function processData(\IRequestObject $requestObject)
 {
     if ($requestObject instanceof \AjaxRequestObject) {
         $this->params = $requestObject->getParams();
         isset($this->params["id"]) ? $this->id = $this->params["id"] : null;
         isset($this->params["env"]) ? $env = $this->params["env"] : null;
         isset($this->params["type"]) ? $type = $this->params["type"] : null;
     }
     if (isset($env)) {
         $portfolioInstance = \Portfolio\Model\Portfolio::getInstanceByRoom($env);
         $this->entry = $portfolioInstance->createEntry($type);
     } else {
         $room = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($room instanceof \steam_room) {
             $this->entry = \Portfolio\Model\Entry::getEntryByRoom($room);
         }
     }
     $this->id = $this->entry->get_id();
 }
コード例 #2
0
ファイル: DeleteEntry.class.php プロジェクト: rolwi/koala
 public function processData(\IRequestObject $requestObject)
 {
     if ($requestObject instanceof \UrlRequestObject) {
         $this->params = $requestObject->getParams();
         isset($this->params[0]) ? $this->id = $this->params[0] : "";
     } else {
         if ($requestObject instanceof \AjaxRequestObject) {
             $this->params = $requestObject->getParams();
             isset($this->params["id"]) ? $this->id = $this->params["id"] : "";
         }
     }
     if (!isset($this->id) || $this->id === "") {
         throw new \Exception("no valid id");
     } else {
         $room = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($room instanceof \steam_room) {
             $this->entry = \Portfolio\Model\Entry::getEntryByRoom($room);
         }
     }
     $this->id = $this->entry->get_id();
 }