MapClassLoader deprecated

MapClassLoader deprecated

class MapClassLoader

deprecated

since version 3.3, to be removed in 4.0.

A class loader that uses a mapping file to look up paths.

Methods

__construct(array $map)

Constructor.

register(bool $prepend = false)

Registers this instance as an autoloader.

loadClass(string $class)

Loads the given class or interface.

string|null findFile(string $class)

Finds the path to the file where the class is defined.

Details

__construct(array $map)

Constructor.

Parameters

array $map A map where keys are classes and values the absolute file path

register(bool $prepend = false)

Registers this instance as an autoloader.

Parameters

bool $prepend Whether to prepend the autoloader or not

loadClass(string $class)

Loads the given class or interface.

Parameters

string $class The name of the class

string|null findFile(string $class)

Finds the path to the file where the class is defined.

Parameters

string $class The name of the class

Return Value

string|null The path, if found

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/ClassLoader/MapClassLoader.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部