public function doGetSubDirectory(Image $image, array $options) { $subDirs = []; $formats = str_split($options['format']); foreach ($formats as $format) { $subDirs[] = $image->getDateUploaded()->format($format); } $subDir = implode(DIRECTORY_SEPARATOR, $subDirs); if ($options['include_id']) { return $subDir . DIRECTORY_SEPARATOR . $image->getId(); } return $subDir; }
protected function doGetSubDirectory(Image $image, array $options) { $subDir = $image->getId() % $options['dirs']; return $subDir . DIRECTORY_SEPARATOR . $image->getId(); }