PHP Класс Cake\ElasticSearch\Datasource\Connection

Наследование: extends Elastica\Client, implements Cake\Datasource\ConnectionInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$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