Supported Versions: PHP 5, PHP 7, PHP 8
Return the interfaces which are implemented by the given class or interface
<?php class_implements(object|string $object_or_class, bool $autoload = true): array|false
<?php if (! class_exists($cast)) continue;
if (
in_array(CastsAttributes::class, class_implements($cast))
&& isset($attributes[$key])
) {
$attributes[$key] = $model->getAttributes()[$key];
<?php protected function addInterfaceListeners($eventName, array $listeners = [])
{
foreach (class_implements($eventName) as $interface) {
if (isset($this->listeners[$interface])) {
foreach ($this->prepareListeners($interface) as $names) {
$listeners = array_merge($listeners, (array) $names);
<?php return $event;
}
$interfaces = class_implements($event);
if (in_array(ShouldBroadcast::class, $interfaces)) {
$event .= ' <fg=bright-blue>(ShouldBroadcast)</>';
<?php {
$listener = explode('@', $listener);
$interfaces = class_implements($listener[0]);
$listener = implode('@', $listener);
<?php '__laravel_notification' => get_class($notification),
'__laravel_notification_queued' => in_array(
ShouldQueue::class,
class_implements($notification)
),
];
}
<?php yield $stripped;
$interfaces = @class_implements($stripped);
if ($interfaces !== false) {
foreach ($interfaces as $interface) {
<?php private static function createDriver(array $params): Driver
{
if (isset($params['driverClass'])) {
$interfaces = class_implements($params['driverClass']);
if ($interfaces === false || ! in_array(Driver::class, $interfaces, true)) {
throw Exception::invalidDriverClass($params['driverClass']);
<?php $providedSolutions = $this->solutionProviders
->filter(function (string $solutionClass) {
if (! in_array(HasSolutionsForThrowable::class, class_implements($solutionClass))) {
return false;
}
<?php return null;
}
if (! in_array(Solution::class, class_implements($solutionClass))) {
return null;
}
<?php $exceptionClass = ViewException::class;
if (in_array(ProvidesSolution::class, class_implements($e))) {
$exceptionClass = ViewExceptionWithSolution::class;
}
<?php $providedSolutions = $this->solutionProviders
->filter(function (string $solutionClass) {
if (! in_array(HasSolutionsForThrowable::class, class_implements($solutionClass) ?: [])) {
return false;
}
<?php return null;
}
if (! in_array(Solution::class, class_implements($solutionClass) ?: [])) {
return null;
}
<?php if (str_contains($identifier, "@anonymous\0")) {
$this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
}, $identifier);
}
<?php if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) {
$a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
}, $a[Caster::PREFIX_PROTECTED.'message']);
}
<?php $parents[] = $p;
++$i;
}
foreach (class_implements($class) as $p) {
$parents[] = $p;
++$i;
}