Moodle PHP Documentation 4.1
Moodle 4.1dev (Build: 20220512) (5e5e12e0)
Public Member Functions | List of all members
EnchantSpell Class Reference
Inheritance diagram for EnchantSpell:
SpellChecker

Public Member Functions

checkWords ($lang, $words)
 Spellchecks an array of words. More...
 
getSuggestions ($lang, $word)
 Returns suggestions for a specific word. More...
 
loopback ()
 Simple loopback function everything that gets in will be send back. More...
 
 SpellChecker (&$config)
 Old syntax of class constructor. More...
 
 throwError ($str)
 Throws an error message back to the user. More...
 

Member Function Documentation

◆ checkWords()

& EnchantSpell::checkWords (   $lang,
  $words 
)

Spellchecks an array of words.

Parameters
String$langSelected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
Array$wordsArray of words to check.
Return values
Arrayof misspelled words.

Reimplemented from SpellChecker.

◆ getSuggestions()

& EnchantSpell::getSuggestions (   $lang,
  $word 
)

Returns suggestions for a specific word.

Parameters
String$langSelected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
String$wordSpecific word to get suggestions for.
Return values
Arrayof suggestions for the specified word.

Reimplemented from SpellChecker.

◆ loopback()

& SpellChecker::loopback ( )
inherited

Simple loopback function everything that gets in will be send back.

Parameters
$args..Arguments.
Return values
{Array}Array of all input arguments.

◆ SpellChecker()

SpellChecker::SpellChecker ( $config)
inherited

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated:
since Moodle 3.1

◆ throwError()

SpellChecker::throwError (   $str)
inherited

Throws an error message back to the user.

This will stop all execution.

Parameters
{String}$str Message to send back to user.

The documentation for this class was generated from the following file: