Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
 public function testGetSuffix()
 {
     $q = new MediafileQuery();
     $r = $q->filterByPrimaryKey('36')->findOne();
     $this->assertEquals('jpeg', $r->getSuffix());
 }