Fr3nch13/CakePHP Utilities

LocatorInterface

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
bool

get()

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
throws
RuntimeException

When trying to get alias for which instance has already been created with different options.

Return values
RepositoryInterface

remove()

Removes an repository instance from the registry.

public remove(string $alias) : void
Parameters
$alias : string

The alias to remove.


        
On this page

Search results