1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-01 03:20:17 +02:00

Change signature of Frame::setCore

This commit is contained in:
Oliver Vogel
2022-05-22 11:25:08 +02:00
parent 72bd013b87
commit 35444b249e
4 changed files with 17 additions and 15 deletions

View File

@@ -4,5 +4,20 @@ namespace Intervention\Image\Drivers\Abstract;
abstract class AbstractFrame abstract class AbstractFrame
{ {
// /**
* 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 AbstractFrame
*/
public function setCore($core): self
{
$this->core = $core;
return $this;
}
} }

View File

@@ -27,13 +27,6 @@ class Frame extends AbstractFrame implements FrameInterface
return $this->core; return $this->core;
} }
public function setCore(GdImage $core): self
{
$this->core = $core;
return $this;
}
public function unsetCore(): void public function unsetCore(): void
{ {
unset($this->core); unset($this->core);

View File

@@ -22,13 +22,6 @@ class Frame extends AbstractFrame implements FrameInterface
return $this->core; return $this->core;
} }
public function setCore(Imagick $core): FrameInterface
{
$this->core = $core;
return $this;
}
public function getSize(): SizeInterface public function getSize(): SizeInterface
{ {
return new Size($this->core->getImageWidth(), $this->core->getImageHeight()); return new Size($this->core->getImageWidth(), $this->core->getImageHeight());

View File

@@ -6,6 +6,7 @@ interface FrameInterface
{ {
public function toImage(): ImageInterface; public function toImage(): ImageInterface;
public function getCore(); public function getCore();
public function setCore($core): FrameInterface;
public function getSize(): SizeInterface; public function getSize(): SizeInterface;
public function getDelay(): float; public function getDelay(): float;
public function setDelay(float $delay): FrameInterface; public function setDelay(float $delay): FrameInterface;