Changeset 468 for trunk/lib/SpellCheck.inc.php
- Timestamp:
- Feb 20, 2014 3:03:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
/branches/eli_branch merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/lib/SpellCheck.inc.php
r425 r468 61 61 class SpellCheck { 62 62 63 var$_params = array(63 private $_params = array( 64 64 'language' => 'en', 65 65 'personal_wordlist' => '', // Text file to save custom words to. … … 70 70 ); 71 71 72 var$_pspell_cfg_handle;73 var$_pspell_handle;74 var$_use_personal_wordlist = false;75 var$_errors = array();72 private $_pspell_cfg_handle; 73 private $_pspell_handle; 74 private $_use_personal_wordlist = false; 75 private $_errors = array(); 76 76 77 77 /** … … 80 80 * @param array $params Array of parameters (key => val pairs). 81 81 */ 82 function SpellCheck($params)82 public function __construct($params) 83 83 { 84 84 $app =& App::getInstance(); … … 118 118 * @param array $params Array of parameters (key => val pairs). 119 119 */ 120 function setParam($params)120 public function setParam($params) 121 121 { 122 122 $app =& App::getInstance(); … … 137 137 * @return mixed Configured parameter value. 138 138 */ 139 function getParam($param)139 public function getParam($param) 140 140 { 141 141 $app =& App::getInstance(); … … 154 154 * @return bool True if any errors were found, false otherwise. 155 155 */ 156 function anyErrors()156 public function anyErrors() 157 157 { 158 158 return (sizeof($this->_errors) > 0); … … 162 162 * Reset the error list. 163 163 */ 164 function resetErrorList()164 public function resetErrorList() 165 165 { 166 166 $this->_errors = array(); … … 177 177 * @since 09 Jun 2005 18:23:51 178 178 */ 179 function check($word)179 public function check($word) 180 180 { 181 181 if (pspell_check($this->_pspell_handle, $word)) { … … 197 197 * @since 09 Jun 2005 18:23:51 198 198 */ 199 function suggest($word)199 public function suggest($word) 200 200 { 201 201 return pspell_suggest($this->_pspell_handle, $word); … … 212 212 * @since 09 Jun 2005 18:23:51 213 213 */ 214 function add($word)214 public function add($word) 215 215 { 216 216 $app =& App::getInstance(); … … 237 237 * @since 09 Jun 2005 18:23:51 238 238 */ 239 function save()239 public function save() 240 240 { 241 241 $app =& App::getInstance(); … … 263 263 * @since 09 Jun 2005 21:29:49 264 264 */ 265 function getStringSuggestions($string)265 public function getStringSuggestions($string) 266 266 { 267 267 $corrections = array(); … … 299 299 * @since 09 Jun 2005 22:11:27 300 300 */ 301 function checkString($string)301 public function checkString($string) 302 302 { 303 303 $errors = array(); … … 331 331 * @since 09 Jun 2005 21:29:49 332 332 */ 333 function getStringHighlighted($string, $show_footnote=false)333 public function getStringHighlighted($string, $show_footnote=false) 334 334 { 335 335 $words = preg_split('/([\W]+?)/', $string, -1, PREG_SPLIT_DELIM_CAPTURE); … … 357 357 * @since 09 Jun 2005 21:29:49 358 358 */ 359 function printCorrectionForm($form_name)359 public function printCorrectionForm($form_name) 360 360 { 361 361 ?> … … 402 402 * @since 09 Jun 2005 23:15:35 403 403 */ 404 function anyFormCorrections()404 public function anyFormCorrections() 405 405 { 406 406 return (false !== getFormData('spelling_suggestions', false)) || (false !== getFormData('spelling_corrections', false)); … … 417 417 * @since 09 Jun 2005 23:18:51 418 418 */ 419 function applyFormCorrections($form_name)419 public function applyFormCorrections($form_name) 420 420 { 421 421 $form_words = preg_split('/([\W]+?)/', getFormData($form_name), -1, PREG_SPLIT_DELIM_CAPTURE); … … 445 445 } // End. 446 446 447 ?>
Note: See TracChangeset
for help on using the changeset viewer.