src/AtechNet/CoreBundle/Service/Furbify/ImageService.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Service\Furbify;
  3. use App\AtechNet\CoreBundle\Helper\Furbify\Image;
  4. // @TODO
  5. class ImageService 
  6. {
  7.     /**
  8.      * @param array<string,string|int> $cloudflare
  9.      */
  10.     public function __construct(
  11.         private array $cloudflare = []
  12.     ) {}
  13.     /**
  14.      * @param object|string|array<string,string> $photo
  15.      * @param string $directory
  16.      * @param bool|null $overwrite
  17.      * 
  18.      * @return Image
  19.      */
  20.     public function of($photo, $directory = 'product', ?bool $overwrite = null): Image {
  21.         return new Image($this->cloudflare, $photo, $directory, $overwrite);
  22.     }
  23.     /**
  24.      * @return array<string,string|int>
  25.      */
  26.     public function getCloudflareConfiguration(): array
  27.     {
  28.         return $this->cloudflare;
  29.     }
  30. }