예제 #1
0
 /**
  * @param \Sgdoce\Model\Entity\ArtefatoImagem $artefatoImagemEntity
  * @return void
  */
 private function _fillFileInfromation(ArtefatoImagemEntity $artefatoImagemEntity, $filename)
 {
     if (!file_exists($filename)) {
         throw new \Core_Exception_ServiceLayer('Problema ao encontrar o arquivo');
     }
     $hash = hash_file(self::HASH_ALGORITHM, $filename);
     $md5 = md5($hash);
     $artefatoImagemEntity->setTxHash($hash);
     $artefatoImagemEntity->setNoArquivo($md5);
 }