mirror of
https://github.com/Intervention/image.git
synced 2025-08-10 07:53:58 +02:00
Implement __debugInfo() for Origin::class
This commit is contained in:
@@ -17,6 +17,7 @@ class Origin
|
|||||||
protected string $mediaType = 'application/octet-stream',
|
protected string $mediaType = 'application/octet-stream',
|
||||||
protected ?string $filePath = null
|
protected ?string $filePath = null
|
||||||
) {
|
) {
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -85,4 +86,17 @@ class Origin
|
|||||||
{
|
{
|
||||||
return empty($this->filePath) ? null : pathinfo($this->filePath, PATHINFO_EXTENSION);
|
return empty($this->filePath) ? null : pathinfo($this->filePath, PATHINFO_EXTENSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show debug info for the current image
|
||||||
|
*
|
||||||
|
* @return array<string, null|string>
|
||||||
|
*/
|
||||||
|
public function __debugInfo(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'mediaType' => $this->mediaType(),
|
||||||
|
'filePath' => $this->filePath(),
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user