Autoloader
in package
Special Autoloader for Proxy classes, which are not PSR-0 compliant.
Tags
Table of Contents
- register() : Closure
- Registers and returns autoloader callback for the given proxy dir and namespace.
- resolveFile() : string
- Resolves proxy class name to a filename based on the following pattern.
Methods
register()
Registers and returns autoloader callback for the given proxy dir and namespace.
public
static register(string $proxyDir, string $proxyNamespace[, callable|null $notFoundCallback = null ]) : Closure
Parameters
- $proxyDir : string
- $proxyNamespace : string
- $notFoundCallback : callable|null = null
-
Invoked when the proxy file is not found.
Tags
Return values
Closure —resolveFile()
Resolves proxy class name to a filename based on the following pattern.
public
static resolveFile(string $proxyDir, string $proxyNamespace, string $className) : string
- Remove Proxy namespace from class name.
- Remove namespace separators from remaining class name.
- Return PHP filename from proxy-dir with the result from 2.
Parameters
- $proxyDir : string
- $proxyNamespace : string
- $className : string