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:
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
|
@@ -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());
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user