/** * @param int $width * @param int $height * @param string $extension * @return string */ private function buildFolderPath($width, $height, $extension) { if (null === ($disposition = Image::resolveDisposition($width, $height))) { $disposition = Faker::randomElement([Image::LANDSCAPE, Image::PORTRAIT]); } return sprintf('%s/%s/%s', $this->folder, $disposition, $extension); }
/** * {@inheritdoc} */ public function output(Image $image, OutputInterface $output) { $output->write($image->getPath()); }