AlphabeticBrowseCommand
extends CallMethodCommand
in package
Fetch alphabrowse data from the backend (currently only supported by Solr)
Tags
Table of Contents
- $backendId : string
- Search backend identifier
- $context : mixed
- Command context
- $executed : bool
- Was the command executed?
- $extraRequestDetails : array<string|int, mixed>|null
- Optional search details.
- $from : string
- Starting point for browse results.
- $interface : string
- Search backend interface
- $limit : int
- Number of results to return on each page.
- $method : string
- Search backend interface method
- $offsetDelta : int
- Delta to use when calculating page offset.
- $page : int
- Result page to return.
- $params : ParamBag
- Search backend parameters
- $result : mixed
- Result of executed operation
- $source : string
- Name of index to search.
- __construct() : mixed
- Constructor.
- execute() : CommandInterface
- Execute command on backend.
- getArguments() : array<string|int, mixed>
- Return search backend interface method arguments.
- getContext() : mixed
- Return command context.
- getExtraRequestDetails() : array<string|int, mixed>|null
- Get extra request details.
- getFrom() : string
- Return starting point for browse results.
- getLimit() : int
- Return number of results to return on each page.
- getOffsetDelta() : int
- Return delta to use when calculating page offset.
- getPage() : int
- Return result page to return.
- getResult() : mixed
- Return result of executed operation.
- getSearchParameters() : ParamBag
- Return search parameters.
- getSource() : string
- Return name of index to search.
- 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
$extraRequestDetails
Optional search details.
protected
array<string|int, mixed>|null
$extraRequestDetails
= null
$from
Starting point for browse results.
protected
string
$from
$interface
Search backend interface
protected
string
$interface
$limit
Number of results to return on each page.
protected
int
$limit
$method
Search backend interface method
protected
string
$method
$offsetDelta
Delta to use when calculating page offset.
protected
int
$offsetDelta
$page
Result page to return.
protected
int
$page
$params
Search backend parameters
protected
ParamBag
$params
$result
Result of executed operation
protected
mixed
$result
$source
Name of index to search.
protected
string
$source
Methods
__construct()
Constructor.
public
__construct(string $backendId, string $source, string $from, int $page[, int $limit = 20 ][, ParamBag|null $params = null ], int $offsetDelta) : mixed
Parameters
- $backendId : string
-
Search backend identifier
- $source : string
-
Name of index to search
- $from : string
-
Starting point for browse results
- $page : int
-
Result page to return (starts at 0)
- $limit : int = 20
-
Number of results to return on each page
- $params : ParamBag|null = null
-
Additional parameters
- $offsetDelta : int
-
Delta to use when calculating page offset (useful for showing a few results above the highlighted row)
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
getArguments()
Return search backend interface method arguments.
public
getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed> —getContext()
Return command context.
public
getContext() : mixed
Return values
mixed —getExtraRequestDetails()
Get extra request details.
public
getExtraRequestDetails() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —getFrom()
Return starting point for browse results.
public
getFrom() : string
Return values
string —getLimit()
Return number of results to return on each page.
public
getLimit() : int
Return values
int —getOffsetDelta()
Return delta to use when calculating page offset.
public
getOffsetDelta() : int
Return values
int —getPage()
Return result page to return.
public
getPage() : int
Return values
int —getResult()
Return result of executed operation.
public
getResult() : mixed
Tags
Return values
mixed —getSearchParameters()
Return search parameters.
public
getSearchParameters() : ParamBag
Return values
ParamBag —getSource()
Return name of index to search.
public
getSource() : string
Return values
string —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