Class rcube_spellchecker

Description

Helper class for spellchecking with Googielspell and PSpell support.

Located in /rcube_spellchecker.php (line 33)


	
			
Class Constant Summary
 GOOGLE_HOST = 'ssl://www.google.com'
 GOOGLE_PORT = 443
Method Summary
 rcube_spellchecker __construct ([string $lang = 'en'])
 void add_word (string $word)
 bool check (string $text, [bool $is_html = false])
 string error ()
 int found ()
 array get ()
 array get_suggestions (string $word)
 array get_words ([string $text = null], [ $is_html = false])
 string get_xml ()
 bool is_exception (string $word)
 void remove_word (string $word)
Methods
Constructor __construct (line 57)

Constructor

rcube_spellchecker __construct ([string $lang = 'en'])
  • string $lang: Language code
add_word (line 497)

Add a word to dictionary

  • access: public
void add_word (string $word)
  • string $word: The word to add
check (line 87)

Set content and check spelling

  • return: True when no mispelling found, otherwise false
bool check (string $text, [bool $is_html = false])
  • string $text: Text content for spellchecking
  • bool $is_html: Enables HTML-to-Text conversion
error (line 204)

Returns error message

  • return: Error message
string error ()
found (line 113)

Number of mispellings found (after check)

  • return: Number of mispellings
int found ()
get (line 181)

Returns checking result (mispelled words with suggestions)

  • return: Spellchecking result. An array indexed by word.
array get ()
get_suggestions (line 126)

Returns suggestions for the specified word

  • return: Suggestions list
array get_suggestions (string $word)
  • string $word: The word
get_words (line 144)

Returns mispelled words

  • return: List of mispelled words
array get_words ([string $text = null], [ $is_html = false])
  • string $text: The content for spellchecking. If empty content used for check() method will be used.
  • $is_html
get_xml (line 159)

Returns checking result in XML (Googiespell) format

  • return: XML content
string get_xml ()
is_exception (line 461)

Check if the specified word is an exception accoring to spellcheck options.

  • return: True if the word is an exception, False otherwise
  • access: public
bool is_exception (string $word)
  • string $word: The word
remove_word (line 521)

Remove a word from dictionary

  • access: public
void remove_word (string $word)
  • string $word: The word to remove
Class Constants
GOOGLE_HOST = 'ssl://www.google.com' (line 47)
GOOGLE_PORT = 443 (line 48)
MAX_SUGGESTIONS = 10 (line 49)

Documentation generated on Wed, 23 May 2012 16:40:53 +0200 by phpDocumentor 1.4.4