Horde_SpellChecker_Aspell
extends Horde_SpellChecker
in package
A spellcheck driver for the aspell/ispell binary.
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.
- _cmd() : string
- Create the command line string.
- _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> $args = array() ]) : mixed
Parameters
- $args : array<string|int, mixed> = array()
-
Additional arguments:
- path: (string) Path to the aspell binary.
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
spellCheck(mixed $text) : array<string|int, mixed>
Parameters
- $text : mixed
-
Text to spellcheck.
Return values
array<string|int, mixed> —TODO
_cmd()
Create the command line string.
protected
_cmd() : string
Return values
string —The command to run.
_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.