Horde_SpellChecker
in package
Provides a unified spellchecker API.
Tags
Table of Contents
- SUGGEST_FAST = 1
- SUGGEST_NORMAL = 2
- SUGGEST_SLOW = 3
- $_params : array<string|int, mixed>
- Configuration parameters.
- __construct() : mixed
- Constructor.
- factory() : Horde_SpellChecker
- Attempts to return a concrete Horde_SpellChecker instance based on $driver.
- setParams() : mixed
- Set configuration parmeters.
- spellCheck() : array<string|int, mixed>
- Perform spellcheck.
- _getWords() : array<string|int, mixed>
- TODO
- _inLocalDictionary() : bool
- Determine if a word exists in the local dictionary.
Constants
SUGGEST_FAST
public
mixed
SUGGEST_FAST
= 1
SUGGEST_NORMAL
public
mixed
SUGGEST_NORMAL
= 2
SUGGEST_SLOW
public
mixed
SUGGEST_SLOW
= 3
Properties
$_params
Configuration parameters.
protected
array<string|int, mixed>
$_params
= array('html' => \false, 'locale' => 'en', 'localDict' => array(), 'maxSuggestions' => 10, 'minLength' => 3, 'suggestMode' => self::SUGGEST_FAST)
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
TODO
Return values
mixed —factory()
Attempts to return a concrete Horde_SpellChecker instance based on $driver.
public
static factory(string $driver[, array<string|int, mixed> $params = array() ]) : Horde_SpellChecker
Parameters
- $driver : string
-
The type of concrete subclass to return.
- $params : array<string|int, mixed> = array()
-
A hash containing any additional configuration or connection parameters a subclass might need.
Tags
Return values
Horde_SpellChecker —The newly created instance.
setParams()
Set configuration parmeters.
public
setParams(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
-
Parameters to set.
Return values
mixed —spellCheck()
Perform spellcheck.
public
abstract spellCheck(string $text) : array<string|int, mixed>
Parameters
- $text : string
-
Text to spellcheck.
Tags
Return values
array<string|int, mixed> —TODO
_getWords()
TODO
protected
_getWords(string $text) : array<string|int, mixed>
Parameters
- $text : string
-
TODO
Return values
array<string|int, mixed> —TODO
_inLocalDictionary()
Determine if a word exists in the local dictionary.
protected
_inLocalDictionary(string $word) : bool
Parameters
- $word : string
-
The word to check.
Return values
bool —True if the word appears in the local dictionary.