/** * 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)); }
/** * Removes entry with photo from journal * @param string $id * @throws EntryNotFound */ public function remove($id) { $this->directoryHelper->removeEntry($id); $this->directoryHelper->removePhoto($id); }