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.
파일 보기 프로젝트 열기: cakephp/elastic-search 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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