Exemple #1
0
 public function marshallResource(Photo $photo)
 {
     return ['_id' => $photo->id()->value(), 'quote' => $photo->quote()->value(), 'upload' => ['filename' => $photo->upload()->filename(), 'mime_type' => $photo->upload()->mimeType()], 'image_details' => ['hex_color' => $photo->imageDetails()->hexColor(), 'width' => $photo->imageDetails()->width(), 'height' => $photo->imageDetails()->height()], 'creation_date' => $photo->createdAt(), 'user' => $photo->createdBy()->value()];
 }
Exemple #2
0
 private function moveOriginalImage(Photo $photo, $temporary_location)
 {
     $this->file_handler->copy($temporary_location, $this->uploads_folder . $photo->upload()->filename());
     $this->file_handler->remove([$temporary_location]);
 }