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