mirror of
https://github.com/Intervention/image.git
synced 2025-01-18 04:38:26 +01:00
Change signature of Frame::setCore
This commit is contained in:
parent
72bd013b87
commit
35444b249e
@ -4,5 +4,20 @@ namespace Intervention\Image\Drivers\Abstract;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public function setCore(GdImage $core): self
|
||||
{
|
||||
$this->core = $core;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function unsetCore(): void
|
||||
{
|
||||
unset($this->core);
|
||||
|
@ -22,13 +22,6 @@ class Frame extends AbstractFrame implements FrameInterface
|
||||
return $this->core;
|
||||
}
|
||||
|
||||
public function setCore(Imagick $core): FrameInterface
|
||||
{
|
||||
$this->core = $core;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSize(): SizeInterface
|
||||
{
|
||||
return new Size($this->core->getImageWidth(), $this->core->getImageHeight());
|
||||
|
@ -6,6 +6,7 @@ interface FrameInterface
|
||||
{
|
||||
public function toImage(): ImageInterface;
|
||||
public function getCore();
|
||||
public function setCore($core): FrameInterface;
|
||||
public function getSize(): SizeInterface;
|
||||
public function getDelay(): float;
|
||||
public function setDelay(float $delay): FrameInterface;
|
||||
|
Loading…
x
Reference in New Issue
Block a user