VuFind API Documentation

ErrorListener extends AbstractErrorListener
in package

SOLR 3.x error listener.

Tags
category

VuFind

author

David Maus maus@hab.de

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Table of Contents

TAG_PARSER_ERROR  = 'VuFind\\Search\\ParserError'
Tag indicating a parser error.
TYPE_JSON  = 'json'
TYPE_OTHER  = 'other'
Normalized media types.
TYPE_XML  = 'xml'
$backends  : array<string|int, mixed>
Backends to listen for.
__construct()  : void
Constructor.
addBackend()  : void
Add backend to listen for.
attach()  : void
Attach listener to shared event manager.
listenForBackend()  : bool
Return true if listeners listens for backend errors.
onSearchError()  : EventInterface
VuFindSearch.error
analyzeJsonErrorResponse()  : array<string|int, mixed>
Analyze JSON-encoded error response and return appropriate tags.
getResponseBodyMediaType()  : string
Return normalized media type identifier.

Constants

TAG_PARSER_ERROR

Tag indicating a parser error.

public string TAG_PARSER_ERROR = 'VuFind\\Search\\ParserError'

TYPE_OTHER

Normalized media types.

public string TYPE_OTHER = 'other'

Properties

Methods

__construct()

Constructor.

public __construct(string $backend) : void
Parameters
$backend : string

Identifier of backend to listen for

Return values
void

addBackend()

Add backend to listen for.

public addBackend(string $backend) : void
Parameters
$backend : string

Identifier of backend to listen for

Return values
void

attach()

Attach listener to shared event manager.

public attach(SharedEventManagerInterface $manager) : void
Parameters
$manager : SharedEventManagerInterface

Shared event manager

Return values
void

listenForBackend()

Return true if listeners listens for backend errors.

public listenForBackend(string $backend) : bool
Parameters
$backend : string

Backend identifier

Return values
bool

onSearchError()

VuFindSearch.error

public onSearchError(EventInterface $event) : EventInterface
Parameters
$event : EventInterface

Event

Return values
EventInterface

analyzeJsonErrorResponse()

Analyze JSON-encoded error response and return appropriate tags.

protected analyzeJsonErrorResponse(StdLib $body) : array<string|int, mixed>
Parameters
$body : StdLib

Deserialize JSON body

Return values
array<string|int, mixed>

Tags

getResponseBodyMediaType()

Return normalized media type identifier.

protected getResponseBodyMediaType(Response $response) : string
Parameters
$response : Response

HTTP response

Return values
string

One of json', xml', or `other'

Search results