Example #1
0
 /**
  * Save entry pic on disk.
  *
  * @param DirectoryHelper $directoryHelper
  */
 public function savePhoto(DirectoryHelper $directoryHelper)
 {
     $path = $directoryHelper->getPhotoPath($this->getId());
     file_put_contents($path, file_get_contents($this->photo));
 }
Example #2
0
 /**
  * Removes entry with photo from journal
  * @param string $id
  * @throws EntryNotFound
  */
 public function remove($id)
 {
     $this->directoryHelper->removeEntry($id);
     $this->directoryHelper->removePhoto($id);
 }