$ account Ocramius
ProxyManager is a PHP library for generating proxy classes at runtime. It provides implementations for several proxy patterns: lazy loading (ghost and value holder), access interceptors (with value holder or scope localizer), null objects, and remote objects. The library uses Laminas Code for code generation and reflection to dynamically create proxy classes that wrap or substitute real objects. It is designed as a standalone Composer package with a configuration-driven architecture: a central Configuration object manages autoloading, generator strategies (evaluating or file-writing), class name inflectors, and signature verification. Factories (e.g., LazyLoadingValueHolderFactory, NullObjectFactory) serve as the primary entry points for users, each producing proxies for a given class or interface. The generated proxies include methods for initialization control, interceptor callbacks, and property access simulation. The library is extensively tested with unit tests, functional tests, and mutation testing, and includes benchmarks for performance. External dependencies are limited to Laminas Code and Composer's installed versions API.