Class cmd_spell

Description

Command line spellcheck class, compatible with ispell and aspell.

Located in /plugins/spellcheck/class/cmd_spell.php (line 34)

squirrelspell
   |
   --cmd_spell
Variable Summary
 mixed $debug
 string $temp_dir
 mixed $userdic
 boolean $use_proc_open
Method Summary
 cmd_spell cmd_spell ([array $aParams = array()])
 array check_text (string $sText)
 mixed exec_spell (string $sText)
 string prepare_text (string $sText)
 mixed proc_open_spell (string $sText)
Variables
mixed $debug = false (line 52)
mixed $missed_words = array() (line 54)
string $spell_command = '' (line 38)
string $temp_dir = '' (line 49)
mixed $userdic = array() (line 39)
boolean $use_proc_open = false (line 45)

Controls which function is used to execute ispell. proc_open() should be used in PHP 4.3+. exec() can be used in older PHP versions.

Inherited Variables

Inherited from squirrelspell

squirrelspell::$error
Methods
Constructor cmd_spell (line 60)

Constructor function

cmd_spell cmd_spell ([array $aParams = array()])
  • array $aParams
check_text (line 213)

Checks block of text

array check_text (string $sText)
  • string $sText: text

Redefinition of:
squirrelspell::check_text()
exec_spell (line 150)
  • return: array with command output or false.
mixed exec_spell (string $sText)
  • string $sText
prepare_text (line 198)

Prepares string for ispell/aspell parsing

Function adds an extra space at the beginning of each line. This way ispell/aspell don't treat these as command characters.

string prepare_text (string $sText)
  • string $sText
proc_open_spell (line 97)
  • return: array with command output or false.
mixed proc_open_spell (string $sText)
  • string $sText

Inherited Methods

Inherited From squirrelspell

 squirrelspell::check_text()
 squirrelspell::set_error()

Documentation generated on Sun, 22 Nov 2009 17:36:20 +0200 by phpDocumentor 1.4.3