Example #1
0
 /**
  * Turn this item object into a generic array
  *
  * @return array
  */
 public function transform(File $file = null)
 {
     if ($file === null) {
         return [];
     }
     return ['id' => (int) $file->getId(), 'mimeType' => $file->getMimeType(), 'size' => $file->getSize(), 'name' => $file->getName(), 'uri' => $file->getUri()];
 }