raw
mp-wp_genesis           1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
mp-wp_genesis 4 *
mp-wp_genesis 5 * @package MCManager.includes
mp-wp_genesis 6 * @author Moxiecode
mp-wp_genesis 7 */
mp-wp_genesis 8
mp-wp_genesis 9 class SpellChecker {
mp-wp_genesis 10 /**
mp-wp_genesis 11 * Constructor.
mp-wp_genesis 12 *
mp-wp_genesis 13 * @param $config Configuration name/value array.
mp-wp_genesis 14 */
mp-wp_genesis 15 function SpellChecker(&$config) {
mp-wp_genesis 16 $this->_config = $config;
mp-wp_genesis 17 }
mp-wp_genesis 18
mp-wp_genesis 19 /**
mp-wp_genesis 20 * Simple loopback function everything that gets in will be send back.
mp-wp_genesis 21 *
mp-wp_genesis 22 * @param $args.. Arguments.
mp-wp_genesis 23 * @return {Array} Array of all input arguments.
mp-wp_genesis 24 */
mp-wp_genesis 25 function &loopback(/* args.. */) {
mp-wp_genesis 26 return func_get_args();
mp-wp_genesis 27 }
mp-wp_genesis 28
mp-wp_genesis 29 /**
mp-wp_genesis 30 * Spellchecks an array of words.
mp-wp_genesis 31 *
mp-wp_genesis 32 * @param {String} $lang Language code like sv or en.
mp-wp_genesis 33 * @param {Array} $words Array of words to spellcheck.
mp-wp_genesis 34 * @return {Array} Array of misspelled words.
mp-wp_genesis 35 */
mp-wp_genesis 36 function &checkWords($lang, $words) {
mp-wp_genesis 37 return $words;
mp-wp_genesis 38 }
mp-wp_genesis 39
mp-wp_genesis 40 /**
mp-wp_genesis 41 * Returns suggestions of for a specific word.
mp-wp_genesis 42 *
mp-wp_genesis 43 * @param {String} $lang Language code like sv or en.
mp-wp_genesis 44 * @param {String} $word Specific word to get suggestions for.
mp-wp_genesis 45 * @return {Array} Array of suggestions for the specified word.
mp-wp_genesis 46 */
mp-wp_genesis 47 function &getSuggestions($lang, $word) {
mp-wp_genesis 48 return array();
mp-wp_genesis 49 }
mp-wp_genesis 50
mp-wp_genesis 51 /**
mp-wp_genesis 52 * Throws an error message back to the user. This will stop all execution.
mp-wp_genesis 53 *
mp-wp_genesis 54 * @param {String} $str Message to send back to user.
mp-wp_genesis 55 */
mp-wp_genesis 56 function throwError($str) {
mp-wp_genesis 57 die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
mp-wp_genesis 58 }
mp-wp_genesis 59 }
mp-wp_genesis 60
mp-wp_genesis 61 ?>