PHP 클래스 Cake\ElasticSearch\Datasource\Connection

상속: extends Elastica\Client, implements Cake\Datasource\ConnectionInterface
파일 보기 프로젝트 열기: cakephp/elastic-search 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$configName string The connection name in the connection manager.
$logQueries boolean Whether or not query logging is enabled.

공개 메소드들

메소드 설명
__construct ( array $config = [], callback $callback = null ) Constructor. Appends the default index name to the config array, which by default is _all
beginTransaction ( ) {@inheritDoc}
config ( ) : array Get the config data for this connection.
configName ( ) {@inheritDoc}
disableConstraints ( callable $callback ) {@inheritDoc}
disableForeignKeys ( ) {@inheritDoc}
enableForeignKeys ( ) {@inheritDoc}
enabled ( ) {@inheritDoc}
getIndex ( string $name = null ) : Index Returns the index for the given connection
logQueries ( $enable = null ) {@inheritDoc}
logger ( object $instance = null ) : object Sets the logger object instance. When called with no arguments it returns the currently setup logger instance.
schemaCollection ( ) : SchemaCollection Returns a SchemaCollection stub until we can add more abstract API's in Connection.
transactional ( callable $callable ) {@inheritDoc}

보호된 메소드들

메소드 설명
_log ( Request | array $context ) : void Log requests to Elastic Search.

메소드 상세

__construct() 공개 메소드

Constructor. Appends the default index name to the config array, which by default is _all
public __construct ( array $config = [], callback $callback = null )
$config array config options
$callback callback Callback function which can be used to be notified about errors (for example connection down)

_log() 보호된 메소드

Log requests to Elastic Search.
protected _log ( Request | array $context ) : void
$context Elastica\Request | array The context of the request made.
리턴 void

beginTransaction() 공개 메소드

{@inheritDoc}
public beginTransaction ( )

config() 공개 메소드

Get the config data for this connection.
public config ( ) : array
리턴 array

configName() 공개 메소드

{@inheritDoc}
public configName ( )

disableConstraints() 공개 메소드

Elasticsearch does not deal with the concept of foreign key constraints This method just triggers the $callback argument.
public disableConstraints ( callable $callback )
$callback callable

disableForeignKeys() 공개 메소드

{@inheritDoc}
public disableForeignKeys ( )

enableForeignKeys() 공개 메소드

{@inheritDoc}
public enableForeignKeys ( )

enabled() 공개 메소드

{@inheritDoc}
public enabled ( )

getIndex() 공개 메소드

Returns the index for the given connection
public getIndex ( string $name = null ) : Index
$name string Index name to create connection to, if no value is passed it will use the default index name for the connection.
리턴 Elastica\Index Index for the given name

logQueries() 공개 메소드

{@inheritDoc}
public logQueries ( $enable = null )

logger() 공개 메소드

Sets the logger object instance. When called with no arguments it returns the currently setup logger instance.
public logger ( object $instance = null ) : object
$instance object logger object instance
리턴 object logger instance

schemaCollection() 공개 메소드

Returns a SchemaCollection stub until we can add more abstract API's in Connection.
public schemaCollection ( ) : SchemaCollection
리턴 SchemaCollection

transactional() 공개 메소드

{@inheritDoc}
public transactional ( callable $callable )
$callable callable

프로퍼티 상세

$configName 보호되어 있는 프로퍼티

The connection name in the connection manager.
protected string $configName
리턴 string

$logQueries 보호되어 있는 프로퍼티

Whether or not query logging is enabled.
protected bool $logQueries
리턴 boolean