1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-16 10:54:02 +02:00

Remove AbstractFrame::class

This commit is contained in:
Oliver Vogel
2022-05-22 17:26:16 +02:00
parent a937e5a94d
commit 190f46fc12
3 changed files with 16 additions and 29 deletions

View File

@@ -1,25 +0,0 @@
<?php
namespace Intervention\Image\Drivers\Abstract;
use Intervention\Image\Interfaces\FrameInterface;
abstract class AbstractFrame implements FrameInterface
{
/**
* Set the frame core
*
* Input is losely typed and depending on the driver.
* Might be GdImage or Imagick but should be open to
* add more drivers.
*
* @param mixed $core
* @return FrameInterface
*/
public function setCore($core): FrameInterface
{
$this->core = $core;
return $this;
}
}

View File

@@ -4,13 +4,12 @@ namespace Intervention\Image\Drivers\Gd;
use GdImage;
use Intervention\Image\Collection;
use Intervention\Image\Drivers\Abstract\AbstractFrame;
use Intervention\Image\Geometry\Size;
use Intervention\Image\Interfaces\FrameInterface;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\SizeInterface;
class Frame extends AbstractFrame implements FrameInterface
class Frame implements FrameInterface
{
public function __construct(
protected GdImage $core,
@@ -22,6 +21,13 @@ class Frame extends AbstractFrame implements FrameInterface
//
}
public function setCore($core): FrameInterface
{
$this->core = $core;
return $this;
}
public function getCore(): GdImage
{
return $this->core;

View File

@@ -4,19 +4,25 @@ namespace Intervention\Image\Drivers\Imagick;
use Imagick;
use Intervention\Image\Collection;
use Intervention\Image\Drivers\Abstract\AbstractFrame;
use Intervention\Image\Geometry\Size;
use Intervention\Image\Interfaces\FrameInterface;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\SizeInterface;
class Frame extends AbstractFrame implements FrameInterface
class Frame implements FrameInterface
{
public function __construct(protected Imagick $core)
{
//
}
public function setCore($core): FrameInterface
{
$this->core = $core;
return $this;
}
public function getCore(): Imagick
{
return $this->core;