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 = '')

No description

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.

bool
isMatch(string $rule, string $target)

Determine if a rule matches a target class name.

array
initProxiesByReflectionClassMap(array $reflectionClassMap = [])

Determine which classes in the class map need proxy generation.

Details

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

No description

Parameters

array $classMap

Map of class names to their source file paths

string $proxyDir

Directory where proxy files are written

at line 48
array getProxies()

Get the generated proxy class map.

Return Value

array

className => proxyFilePath

at line 56
string getProxyDir()

Get the proxy output directory.

Return Value

string

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

Generate proxy files for the given classes.

Parameters

array $proxies

Return Value

array

at line 93
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 116
protected string getProxyFilePath(string $className)

Get the proxy file path for a class.

Parameters

string $className

Return Value

string

at line 127
protected bool isMatch(string $rule, string $target)

Determine if a rule matches a target class name.

Parameters

string $rule
string $target

Return Value

bool

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

Determine which classes in the class map need proxy generation.

Parameters

array $reflectionClassMap

Return Value

array