Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DebugClassLoader.php

function DebugClassLoader::getOwnInterfaces

`class_implements` includes interfaces from the parents so we have to manually exclude them.

Return value

string[]

1 call to DebugClassLoader::getOwnInterfaces()
DebugClassLoader::checkAnnotations in vendor/symfony/error-handler/DebugClassLoader.php

File

vendor/symfony/error-handler/DebugClassLoader.php, line 780

Class

DebugClassLoader
Autoloader checking if the class is really defined in the file found.

Namespace

Symfony\Component\ErrorHandler

Code

private function getOwnInterfaces(string $class, ?string $parent) : array {
    $ownInterfaces = class_implements($class, false);
    if ($parent) {
        foreach (class_implements($parent, false) as $interface) {
            unset($ownInterfaces[$interface]);
        }
    }
    foreach ($ownInterfaces as $interface) {
        foreach (class_implements($interface) as $interface) {
            unset($ownInterfaces[$interface]);
        }
    }
    return $ownInterfaces;
}
RSS feed
Powered by Drupal