GetLuceneHelperCommand
extends AbstractBase
in package
Command to fetch a Lucene helper object from a search backend.
Tags
Table of Contents
- $backendId : string
- Search backend identifier
- $context : mixed
- Command context
- $executed : bool
- Was the command executed?
- $params : ParamBag
- Search backend parameters
- $result : mixed
- Result of executed operation
- __construct() : mixed
- Constructor.
- execute() : CommandInterface
- Execute command on backend.
- getContext() : mixed
- Return command context.
- getResult() : mixed
- Return result of executed operation.
- getSearchParameters() : ParamBag
- Return search parameters.
- getTargetIdentifier() : string
- Return target backend identifier.
- isExecuted() : bool
- Was the command executed?
- setContext() : void
- Set command context.
- setSearchParameters() : void
- Set search parameters.
- setTargetIdentifier() : void
- Set target backend identifier.
- finalizeExecution() : CommandInterface
- Save a result, flag the command as executed, and return the command object; useful as the final step in execute() implementations.
- validateBackend() : void
- Validate that the provided backend matches the expected target identifier.
Properties
$backendId
Search backend identifier
protected
string
$backendId
$context
Command context
protected
mixed
$context
$executed
Was the command executed?
protected
bool
$executed
= false
$params
Search backend parameters
protected
ParamBag
$params
$result
Result of executed operation
protected
mixed
$result
Methods
__construct()
Constructor.
public
__construct(string $backendId) : mixed
Parameters
- $backendId : string
-
Search backend identifier
Return values
mixed —execute()
Execute command on backend.
public
execute(BackendInterface $backend) : CommandInterface
Parameters
- $backend : BackendInterface
-
Backend
Return values
CommandInterface —Command instance for method chaining
getContext()
Return command context.
public
getContext() : mixed
Return values
mixed —getResult()
Return result of executed operation.
public
getResult() : mixed
Tags
Return values
mixed —getSearchParameters()
Return search parameters.
public
getSearchParameters() : ParamBag
Return values
ParamBag —getTargetIdentifier()
Return target backend identifier.
public
getTargetIdentifier() : string
Return values
string —isExecuted()
Was the command executed?
public
isExecuted() : bool
Return values
bool —setContext()
Set command context.
public
setContext(mixed $context) : void
Parameters
- $context : mixed
-
Context
Return values
void —setSearchParameters()
Set search parameters.
public
setSearchParameters(ParamBag $params) : void
Parameters
- $params : ParamBag
-
Params
Return values
void —setTargetIdentifier()
Set target backend identifier.
public
setTargetIdentifier(string $identifier) : void
Parameters
- $identifier : string
-
New identifier
Return values
void —finalizeExecution()
Save a result, flag the command as executed, and return the command object; useful as the final step in execute() implementations.
protected
finalizeExecution(mixed $result) : CommandInterface
Parameters
- $result : mixed
-
Result of execution.
Return values
CommandInterface —validateBackend()
Validate that the provided backend matches the expected target identifier.
protected
validateBackend(BackendInterface $backend) : void
Parameters
- $backend : BackendInterface
-
Backend instance