LocatorInterface
in
Registries for repository objects should implement this interface.
Table of Contents
Methods
- clear() : void
- Clears the registry of configuration and instances.
- exists() : bool
- Check to see if an instance exists in the registry.
- get() : RepositoryInterface
- Get a repository instance from the registry.
- remove() : void
- Removes an repository instance from the registry.
- set() : RepositoryInterface
- Set a repository instance.
Methods
clear()
Clears the registry of configuration and instances.
public
clear() : void
exists()
Check to see if an instance exists in the registry.
public
exists(string $alias) : bool
Parameters
- $alias : string
-
The alias to check for.
Return values
boolget()
Get a repository instance from the registry.
public
get(string $alias[, array<string, mixed> $options = [] ]) : RepositoryInterface
Parameters
- $alias : string
-
The alias name you want to get.
- $options : array<string, mixed> = []
-
The options you want to build the table with.
Tags
Return values
RepositoryInterfaceremove()
Removes an repository instance from the registry.
public
remove(string $alias) : void
Parameters
- $alias : string
-
The alias to remove.
set()
Set a repository instance.
public
set(string $alias, RepositoryInterface $repository) : RepositoryInterface
Parameters
- $alias : string
-
The alias to set.
- $repository : RepositoryInterface
-
The repository to set.