class ProxyManager

Constants

private FINGERPRINT_HEADER

Properties

protected array<string, string> $proxies

The classes that have been rewritten as proxies.

protected Filesystem $filesystem

Methods

__construct(array $classMap = [], string $proxyDir = '', array $replacements = [])

Generate proxies from the supplied source map.

array
getProxies()

Get the generated proxy class map.

string
getProxyDir()

Get the proxy output directory.

array
generateProxyFiles(array $proxies = [])

Generate proxy files for the given classes.

string
putProxyFile(Ast $ast, string $className)

Generate or reuse a content-addressed proxy file.

string
getProxyFilePath(string $className)

Get the proxy file path for a class.

array
initProxiesByReflectionClassMap(array $reflectionClassMap = [])

Determine which classes in the class map need proxy generation.

Details

at line 36
__construct(array $classMap = [], string $proxyDir = '', array $replacements = [])

Generate proxies from the supplied source map.

Parameters

array $classMap

Map of class names to their source file paths

string $proxyDir

Directory where proxy files are written

array $replacements

Source overrides whose proxies need separate files

at line 52
array getProxies()

Get the generated proxy class map.

Return Value

array

className => proxyFilePath

at line 60
string getProxyDir()

Get the proxy output directory.

Return Value

string

at line 71
protected array generateProxyFiles(array $proxies = [])

Generate proxy files for the given classes.

Parameters

array $proxies

Return Value

array

at line 97
protected string putProxyFile(Ast $ast, string $className)

Generate or reuse a content-addressed proxy file.

Parameters

Ast $ast
string $className

Return Value

string

at line 120
protected string getProxyFilePath(string $className)

Get the proxy file path for a class.

Parameters

string $className

Return Value

string

at line 135
protected array initProxiesByReflectionClassMap(array $reflectionClassMap = [])

Determine which classes in the class map need proxy generation.

Parameters

array $reflectionClassMap

Return Value

array