PHP Class XStatic\ProxyManager

Afficher le fichier Open project: jeremeamia/xstatic Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Interop\Container\ContainerInterface $container, xstatic\AliasLoaderInterface $aliasLoader = null )
addProxy ( string $alias, string $proxyFqcn ) Adds a Static Proxy class by delegating to the Alias Loader
enable ( boolean | string $rootNamespace = self::ROOT_NAMESPACE_GLOBAL ) : boolean Enables the Static Proxies by injecting the Container object and registering the Alias Loader for autoloading
setContainer ( Interop\Container\ContainerInterface $container ) Sets the Container object that provides the actual subjects' instances

Method Details

__construct() public méthode

public __construct ( Interop\Container\ContainerInterface $container, xstatic\AliasLoaderInterface $aliasLoader = null )
$container Interop\Container\ContainerInterface Container that holds the actual instances
$aliasLoader xstatic\AliasLoaderInterface Alias Loader object that stores and resolves

addProxy() public méthode

Adds a Static Proxy class by delegating to the Alias Loader
public addProxy ( string $alias, string $proxyFqcn )
$alias string Alias to associate with the Static Proxy class
$proxyFqcn string FQCN of the Static Proxy class

enable() public méthode

Enables the Static Proxies by injecting the Container object and registering the Alias Loader for autoloading
See also: XStatic\AliasLoaderInterface::register()
public enable ( boolean | string $rootNamespace = self::ROOT_NAMESPACE_GLOBAL ) : boolean
$rootNamespace boolean | string The namespace that the alias should be created in
Résultat boolean

setContainer() public méthode

Sets the Container object that provides the actual subjects' instances
public setContainer ( Interop\Container\ContainerInterface $container )
$container Interop\Container\ContainerInterface Instance of a Container (or Service Locator)