class Autoloader (View source)

Methods

static 
resolveFile(string $metadataDir, string $metadataNamespace, string $className)

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

static 
register(string $metadataDir, string $metadataNamespace, callable|null $notFoundCallback = null)

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

Details

static resolveFile(string $metadataDir, string $metadataNamespace, string $className)

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

  1. Remove Metadata namespace from class name.
  2. Remove namespace separators from remaining class name.
  3. Return PHP filename from metadata-dir with the result from 2.

Parameters

string $metadataDir
string $metadataNamespace
string $className

Exceptions

InvalidArgumentException

static register(string $metadataDir, string $metadataNamespace, callable|null $notFoundCallback = null)

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

Parameters

string $metadataDir
string $metadataNamespace
callable|null $notFoundCallback

Exceptions

InvalidArgumentException