Provides an abstract registry/factory for repository objects.
array<string,Cake\Datasource\RepositoryInterface>
Instances that belong to the registry.
array<string, array>
Contains a list of options that were passed to get() method.
Clears the registry of configuration and instances.
Create an instance of a given classname.
Check to see if an instance exists in the registry.
Get a repository instance from the registry.
Removes an repository instance from the registry.
Set a repository instance.
clear(): void
Clears the registry of configuration and instances.
void
createInstance(string $alias, array<string, mixed> $options): Cake\Datasource\RepositoryInterface
Create an instance of a given classname.
string
$alias Repository alias.
array<string, mixed>
$options The options you want to build the instance with.
Cake\Datasource\RepositoryInterface
exists(string $alias): bool
Check to see if an instance exists in the registry.
string
$alias bool
get(string $alias, array<string, mixed> $options = []): Cake\Datasource\RepositoryInterface
Get a repository instance from the registry.
string
$alias The alias name you want to get.
array<string, mixed>
$options optional The options you want to build the table with.
Cake\Datasource\RepositoryInterface
RuntimeException
remove(string $alias): void
Removes an repository instance from the registry.
string
$alias void
set(string $alias, Cake\Datasource\RepositoryInterface $repository): Cake\Datasource\RepositoryInterface
Set a repository instance.
string
$alias Cake\Datasource\RepositoryInterface
$repository Cake\Datasource\RepositoryInterface
Instances that belong to the registry.
array<string,Cake\Datasource\RepositoryInterface>
Contains a list of options that were passed to get() method.
array<string, array>
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Datasource.Locator.AbstractLocator.html