PHP Class DI\Proxy\ProxyFactory

Wraps Ocramius/ProxyManager LazyLoadingValueHolderFactory.
See also: ProxyManager\Factory\LazyLoadingValueHolderFactory
Since: 5.0
Author: Matthieu Napoli ([email protected])
Datei anzeigen Open project: mnapoli/php-di Class Usage Examples

Public Methods

Method Description
__construct ( $writeProxiesToFile, $proxyDirectory = null )
createProxy ( string $className, Closure $initializer ) : ProxyManager\Proxy\LazyLoadingInterface Creates a new lazy proxy instance of the given class with the given initializer.

Private Methods

Method Description
createProxyManager ( )

Method Details

__construct() public method

public __construct ( $writeProxiesToFile, $proxyDirectory = null )

createProxy() public method

Creates a new lazy proxy instance of the given class with the given initializer.
public createProxy ( string $className, Closure $initializer ) : ProxyManager\Proxy\LazyLoadingInterface
$className string name of the class to be proxied
$initializer Closure initializer to be passed to the proxy
return ProxyManager\Proxy\LazyLoadingInterface