class Autoloader (View source)

deprecated The Doctrine\Common\Proxy component is deprecated, please use ocramius/proxy-manager instead.

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

Methods

static string
resolveFile(string $proxyDir, string $proxyNamespace, string $className)

Resolves proxy class name to a filename based on the following pattern.

static Closure
register(string $proxyDir, string $proxyNamespace, callable|null $notFoundCallback = null)

Registers and returns autoloader callback for the given proxy dir and namespace.

Details

static string resolveFile(string $proxyDir, string $proxyNamespace, string $className)

Resolves proxy class name to a filename based on the following pattern.

  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

string $proxyDir
string $proxyNamespace
string $className

Return Value

string

Exceptions

InvalidArgumentException

static Closure register(string $proxyDir, string $proxyNamespace, callable|null $notFoundCallback = null)

Registers and returns autoloader callback for the given proxy dir and namespace.

Parameters

string $proxyDir
string $proxyNamespace
callable|null $notFoundCallback Invoked when the proxy file is not found.

Return Value

Closure

Exceptions

InvalidArgumentException