AbstractBackend
in package
implements
BackendInterface, LoggerAwareInterface
Uses
LoggerAwareTrait
Abstract backend.
Tags
Interfaces, Classes, Traits and Enums
- BackendInterface
- Search backend interface definition.
- LoggerAwareInterface
Table of Contents
- $collectionFactory : RecordCollectionFactoryInterface
- Record collection factory.
- $identifier : string
- Backend identifier.
- getIdentifier() : string
- Return backend identifier.
- getRecordCollectionFactory() : RecordCollectionFactoryInterface
- Return the record collection factory.
- setIdentifier() : void
- Set the backend identifier.
- setRecordCollectionFactory() : void
- Set the record collection factory.
- debug() : void
- Log a debug message.
- injectSourceIdentifier() : RecordCollectionInterface
- Inject source identifier in record collection and all contained records.
- log() : void
- Send a message to the logger.
- logError() : void
- Log an error message.
- logWarning() : void
- Log a warning message.
Properties
$collectionFactory
Record collection factory.
protected
RecordCollectionFactoryInterface
$collectionFactory
= null
$identifier
Backend identifier.
protected
string
$identifier
= null
Methods
getIdentifier()
Return backend identifier.
public
getIdentifier() : string
Return values
string —getRecordCollectionFactory()
Return the record collection factory.
public
abstract getRecordCollectionFactory() : RecordCollectionFactoryInterface
Lazy loads a generic collection factory.
Return values
RecordCollectionFactoryInterface —setIdentifier()
Set the backend identifier.
public
setIdentifier(string $identifier) : void
Parameters
- $identifier : string
-
Backend identifier
Return values
void —setRecordCollectionFactory()
Set the record collection factory.
public
setRecordCollectionFactory(RecordCollectionFactoryInterface $factory) : void
Parameters
- $factory : RecordCollectionFactoryInterface
-
Factory
Return values
void —debug()
Log a debug message.
protected
debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —injectSourceIdentifier()
Inject source identifier in record collection and all contained records.
protected
injectSourceIdentifier(RecordCollectionInterface $response) : RecordCollectionInterface
Parameters
- $response : RecordCollectionInterface
-
Response
Return values
RecordCollectionInterface —log()
Send a message to the logger.
protected
log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
- $level : string
-
Log level
- $message : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = false
-
Prepend class name to message?
Return values
void —logError()
Log an error message.
protected
logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —logWarning()
Log a warning message.
protected
logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?