QueryBase::getClass

public static QueryBase::getClass(array $namespaces, $short_class_name)

Finds a class in a list of namespaces.

Parameters

array $namespaces: A list of namespaces.

string $short_class_name: A class name without namespace.

Return value

string The fully qualified name of the class.

File

core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 477

Class

QueryBase
The base entity query class.

Namespace

Drupal\Core\Entity\Query

Code

public static function getClass(array $namespaces, $short_class_name) {
  foreach ($namespaces as $namespace) {
    $class = $namespace . '\\' . $short_class_name;
    if (class_exists($class)) {
      return $class;
    }
  }
}
doc_Drupal
2016-10-29 09:35:41
Comments
Leave a Comment

Please login to continue.