PHP Class Doctrine\Common\Proxy\Autoloader

Author: Benjamin Eberlei ([email protected])
Datei anzeigen Open project: doctrine/common Class Usage Examples

Public Methods

Method Description
register ( string $proxyDir, string $proxyNamespace, callable | null $notFoundCallback = null ) : Closure Registers and returns autoloader callback for the given proxy dir and namespace.
resolveFile ( string $proxyDir, string $proxyNamespace, string $className ) : string Resolves proxy class name to a filename based on the following pattern.

Method Details

register() public static method

Registers and returns autoloader callback for the given proxy dir and namespace.
public static register ( string $proxyDir, string $proxyNamespace, callable | null $notFoundCallback = null ) : Closure
$proxyDir string
$proxyNamespace string
$notFoundCallback callable | null Invoked when the proxy file is not found.
return Closure

resolveFile() public static method

1. Remove Proxy namespace from class name. 2. Remove namespace separators from remaining class name. 3. Return PHP filename from proxy-dir with the result from 2.
public static resolveFile ( string $proxyDir, string $proxyNamespace, string $className ) : string
$proxyDir string
$proxyNamespace string
$className string
return string