VuFind API Documentation

InjectSpellingListener
in package
Uses LoggerAwareTrait

Solr spelling listener.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Main Site

Table of Contents

$active  : bool
Is spelling active?
$backend  : BackendInterface
Backend.
$dictionaries  : array<string|int, mixed>
Dictionaries for spellcheck.
__construct()  : void
Constructor.
attach()  : void
Attach listener to shared event manager.
onSearchPost()  : EventInterface
Inject additional spelling suggestions.
onSearchPre()  : EventInterface
Set up spelling parameters.
aggregateSpellcheck()  : void
Submit requests for more spelling suggestions.
debug()  : void
Log a debug message.
log()  : void
Send a message to the logger.
logError()  : void
Log an error message.
logWarning()  : void
Log a warning message.

Properties

Methods

__construct()

Constructor.

public __construct(BackendInterface $backend, array<string|int, mixed> $dictionaries[, LoggerInterface $logger = null ]) : void
Parameters
$backend : BackendInterface

Backend

$dictionaries : array<string|int, mixed>

Spelling dictionaries to use.

$logger : LoggerInterface = null

Logger

Return values
void

attach()

Attach listener to shared event manager.

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

Shared event manager

Return values
void

onSearchPost()

Inject additional spelling suggestions.

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

Event

Return values
EventInterface

onSearchPre()

Set up spelling parameters.

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

Event

Return values
EventInterface

aggregateSpellcheck()

Submit requests for more spelling suggestions.

protected aggregateSpellcheck(Spellcheck $spellcheck, string $query) : void
Parameters
$spellcheck : Spellcheck

Aggregating spellcheck object

$query : string

Spellcheck query

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

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?

Return values
void

Search results