You are here

private static function ClassLoader::typeExists in Plug 7

Checks whether a given type exists

Parameters

string $type:

bool $autoload:

Return value

bool

2 calls to ClassLoader::typeExists()
ClassLoader::classExists in lib/doctrine/common/lib/Doctrine/Common/ClassLoader.php
Checks whether a class with a given name exists. A class "exists" if it is either already defined in the current request or if there is an autoloader on the SPL autoload stack that is a) responsible for the class in question and b) is able…
ClassLoader::loadClass in lib/doctrine/common/lib/Doctrine/Common/ClassLoader.php
Loads the given class or interface.

File

lib/doctrine/common/lib/Doctrine/Common/ClassLoader.php, line 274

Class

ClassLoader
A <tt>ClassLoader</tt> is an autoloader for class files that can be installed on the SPL autoload stack. It is a class loader that either loads only classes of a specific namespace or all namespaces and it is suitable for working…

Namespace

Doctrine\Common

Code

private static function typeExists($type, $autoload = false) {
  return class_exists($type, $autoload) || interface_exists($type, $autoload) || function_exists('trait_exists') && trait_exists($type, $autoload);
}