DebugClassLoader deprecated
class DebugClassLoader
deprecated
Autoloader checking if the class is really defined in the file found.
The DebugClassLoader will wrap all registered autoloaders providing a findFile method and will throw an exception if a file is found but does not declare the class.
Methods
__construct(object $classFinder) Constructor. | ||
object | getClassLoader() Gets the wrapped class loader. | |
static | enable() Replaces all autoloaders implementing a findFile method by a DebugClassLoader wrapper. | |
unregister() Unregisters this instance as an autoloader. | ||
string|null | findFile(string $class) Finds a file by class name. | |
bool|null | loadClass(string $class) Loads the given class or interface. |
Details
__construct(object $classFinder)
Constructor.
Parameters
object | $classFinder |
object getClassLoader()
Gets the wrapped class loader.
Return Value
object | a class loader instance |
static enable()
Replaces all autoloaders implementing a findFile method by a DebugClassLoader wrapper.
unregister()
Unregisters this instance as an autoloader.
string|null findFile(string $class)
Finds a file by class name.
Parameters
string | $class | A class name to resolve to file |
Return Value
string|null |
bool|null loadClass(string $class)
Loads the given class or interface.
Parameters
string | $class | The name of the class |
Return Value
bool|null | True, if loaded |
Exceptions
RuntimeException |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/ClassLoader/DebugClassLoader.html