private function LoadDocumentObjects()
 {
     $db = new \Puzzlout\Framework\Dal\Managers('PDO', $this->app());
     $dal = $db->getDalInstance("Document", false);
     if (isset($this->dataPost["itemCategory"]) and isset($this->dataPost["itemId"]) and is_numeric($this->dataPost["itemId"])) {
         return $dal->selectManyByCategoryAndId($this->dataPost["itemCategory"], $this->dataPost["itemId"]);
     } else {
         return array();
     }
 }
 private function AddDocumentToDatabase($document)
 {
     $db = new \Puzzlout\Framework\Dal\Managers('PDO', $this->app());
     $dal = $db->getDalInstance("Document", true);
     $dal->add($document);
 }