Файл: vendor/intervention/gif/src/AbstractEntity.php
Строк: 55
<?php
declare(strict_types=1);
namespace InterventionGif;
use InterventionGifExceptionsEncoderException;
use InterventionGifTraitsCanDecode;
use InterventionGifTraitsCanEncode;
use ReflectionClass;
use ReflectionException;
use Stringable;
abstract class AbstractEntity implements Stringable
{
use CanEncode;
use CanDecode;
public const TERMINATOR = "x00";
/**
* Get short classname of current instance.
*/
public static function shortClassname(): ?string
{
try {
return (new ReflectionClass(static::class))->getShortName();
} catch (ReflectionException) {
return null;
}
}
/**
* Cast object to string.
*
* @throws EncoderException
*/
public function __toString(): string
{
return $this->encode();
}
}