コード例 #1
0
ファイル: Manipulator.php プロジェクト: fvilpoix/php-common
 /**
  * Force the width and the height.
  */
 protected static function resizeByWidthHeight(ImageInterface $image, Format $format)
 {
     $box = new Box($format->getWidth(), $format->getHeight());
     return static::doResize($image, $box);
 }
コード例 #2
0
ファイル: Resizator.php プロジェクト: fvilpoix/php-common
 protected function getFileKeyWithFormat($filename, Format $format, $extension)
 {
     return str_replace(['{format}', '{filename}', '{ext}'], [$format->getRaw(), $filename, $extension], $this->keyPattern);
 }