class_implements
laravel/framework
Supported Versions: PHP 5, PHP 7, PHP 8
Return the interfaces which are implemented by the given class or interface
class_implements
(
object
|
string $object_or_class
,
bool $autoload
=
true
): array|
false
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
);
src/Illuminate/Events/Dispatcher.php
return
$event
;
}
$interfaces
=
class_implements
(
$event
);
if (
in_array
(
ShouldBroadcast
::class,
$interfaces
)) {
$event
.=
' <fg=bright-blue>(ShouldBroadcast)</>'
;
src/Illuminate/Foundation/Console/EventListCommand.php
{
$listener
=
explode
(
'@'
,
$listener
);
$interfaces
=
class_implements
(
$listener
[
0
]);
$listener
=
implode
(
'@'
,
$listener
);
src/Illuminate/Foundation/Console/EventListCommand.php
'__laravel_notification'
=>
get_class
(
$notification
),
'__laravel_notification_queued'
=>
in_array
(
ShouldQueue
::class,
class_implements
(
$notification
)
),
];
}
src/Illuminate/Notifications/Channels/MailChannel.php
yield
$stripped
;
$interfaces
= @
class_implements
(
$stripped
);
if (
$interfaces
!==
false
) {
foreach (
$interfaces
as
$interface
) {
src/Illuminate/Routing/SortedMiddleware.php