Exemplo n.º 1
0
 public function save($postId)
 {
     $directorEntity = new DirectorEntity($postId);
     if ($directorEntity->getType() == DirectorHelper::DIRECTOR_POST_TYPE) {
         if (isset($_FILES) && $_FILES["file"]["name"] != "") {
             $fileArray = FileHelper::uploadFile("file");
             $directorEntity->setFileName($fileArray["fileName"]);
             $directorEntity->setFileUrl($fileArray["fileUrl"]);
             $directorEntity->setFileSize($fileArray["fileSize"]);
         }
     }
 }