method_exists
Intervention/image
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if the class method exists
method_exists
(
object
|
string $object_or_class
,
string $method
):
bool
public function
boot
()
{
if (
method_exists
(
$this
->
provider
,
'boot'
)) {
return
$this
->
provider
->
boot
();
}
}
src/Intervention/Image/ImageServiceProvider.php
$core
=
$image
->
getCore
();
if ( !
method_exists
(
$core
,
'getImageProperties'
)) {
throw new
NotSupportedException
(
"Reading Exif data is not supported by this PHP installation."
);
src/Intervention/Image/Imagick/Commands/ExifCommand.php