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