\Cake\ORM\LocatorLocatorInterface

Registries for Table objects should implement this interface.

Summary

Methods
Constants
config()
get()
exists()
set()
clear()
remove()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

config()

config(string|null  $alias = null, array|null  $options = null) : array

Stores a list of options to be used when instantiating an object with a matching alias.

Parameters

string|null $alias

Name of the alias

array|null $options

list of options for the alias

Returns

array —

The config data.

get()

get(string  $alias, array  $options = array()) : \Cake\ORM\Table

Get a table instance from the registry.

Parameters

string $alias

The alias name you want to get.

array $options

The options you want to build the table with.

Returns

\Cake\ORM\Table

exists()

exists(string  $alias) : boolean

Check to see if an instance exists in the registry.

Parameters

string $alias

The alias to check for.

Returns

boolean

set()

set(string  $alias, \Cake\ORM\Table  $object) : \Cake\ORM\Table

Set an instance.

Parameters

string $alias

The alias to set.

\Cake\ORM\Table $object

The table to set.

Returns

\Cake\ORM\Table

clear()

clear() : void

Clears the registry of configuration and instances.

remove()

remove(string  $alias) : void

Removes an instance from the registry.

Parameters

string $alias

The alias to remove.