Documentation

Autoloader
in package

Special Autoloader for Proxy classes, which are not PSR-0 compliant.

Tags
author

Benjamin Eberlei kontakt@beberlei.de

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
throws
InvalidArgumentException
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
  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.
Parameters
$proxyDir : string
$proxyNamespace : string
$className : string
Tags
throws
InvalidArgumentException
Return values
string

Search results