PHP Класс Cake\ElasticSearch\TypeRegistry

Handles ensuring only one instance of each type is created and that the correct connection is injected in. Provides an interface similar to Cake\ORM\TableRegistry.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$instances array The map of instances in the registry.
$options array List of options by alias passed to get.

Открытые методы

Метод Описание
clear ( ) : void Clears the registry of configuration and instances.
exists ( string $alias ) : boolean Check to see if an instance exists in the registry.
get ( string $alias, array $options = [] ) : Type Get/Create an instance from the registry.
remove ( string $alias ) : void Removes an instance from the registry.
set ( string $alias, Type $object ) : Type Set an instance.

Описание методов

clear() публичный статический Метод

Clears the registry of configuration and instances.
public static clear ( ) : void
Результат void

exists() публичный статический Метод

Check to see if an instance exists in the registry.
public static exists ( string $alias ) : boolean
$alias string The alias to check for.
Результат boolean

get() публичный статический Метод

When getting an instance, if it does not already exist, a new instance will be created using the provide alias, and options.
public static get ( string $alias, array $options = [] ) : Type
$alias string The name of the alias to get.
$options array Configuration options for the type constructor.
Результат Type

remove() публичный статический Метод

Removes an instance from the registry.
public static remove ( string $alias ) : void
$alias string The alias to remove.
Результат void

set() публичный статический Метод

Set an instance.
public static set ( string $alias, Type $object ) : Type
$alias string The alias to set.
$object Type The type to set.
Результат Type

Описание свойств

$instances защищенное статическое свойство

The map of instances in the registry.
protected static array $instances
Результат array

$options защищенное статическое свойство

List of options by alias passed to get.
protected static array $options
Результат array