private function getData()
 {
     $mediaFileQuery = new MediafileQuery();
     $mediaFileResult = $mediaFileQuery->filterByPrimaryKey($this->fileID)->findOne();
     if ($mediaFileResult != NULL) {
         $this->fileInfo = $mediaFileResult;
         $tags = $this->fileInfo->getFileMetasJoinUserAttributes();
         $this->userTags = $this->prepareUserAttributes($tags);
     } else {
         throw new Exception("File not found");
         $this->fileInfo = NULL;
         $this->userTags = NULL;
     }
 }
Example #2
0
 public function testGetSuffix()
 {
     $q = new MediafileQuery();
     $r = $q->filterByPrimaryKey('36')->findOne();
     $this->assertEquals('jpeg', $r->getSuffix());
 }