/data/areaedit/plugins/SpellChecker/spell-check-logic.php

Description

THIRD PARTY CODE <external entry point> SpellChecker backend, Heavily modified for ocPortal

  • author: Yermo Lamers http://www.formvista.com/contact.html
  • copyright: DTLink, LLC 2005
Functions
aspell_check (line 336)

Do aSpell spelling check

  • return: A map, possibly mispelled words, to suggestions
array aspell_check (string $aspelldictionaries, mixed $aspellcommand, string $temptext, string $lang, ?string $text, [?array $words_skip = NULL], [boolean $ret = false])
  • string $aspelldictionaries: aSpell command to get dictionaries
  • mixed $aspellcommand: aSpell call command
  • string $temptext: Temporary file name
  • string $lang: Language being used
  • ?string $text: The text to check (NULL: look from params)
  • ?array $words_skip: Words to skip (NULL: none)
  • boolean $ret: Whether to return data, instead of output
aspell_init (line 155)

Initialise our aSpell calling environment.

  • return: A tuple of environmental details (dictionary list,aspell call command,temporary file name,language being used)
array aspell_init ()
aspell_save (line 553)

Do aSpell dictionary save

void aspell_save (mixed $aspellcommand, string $temptext)
  • mixed $aspellcommand: aSpell call command
  • string $temptext: Temporary file name
do_lang (line 26)

Stub for translations. Really doesn't do anything

  • return: "Translated" version of code
string do_lang (string $x)
  • string $x: Code to translate (currently ignored - only one hard-coded translation in here)
spellchecklogic (line 43)

Start the spellcheck process

  • return: A map, possibly mispelled words, to suggestions
array spellchecklogic ([?string $type = NULL], [?string $text = NULL], [?array $words_skip = NULL], [boolean $ret = false])
  • ?string $type: The type of operation (NULL: look from params)
  • ?string $text: The text to check (NULL: look from params)
  • ?array $words_skip: A list of words to skip checking of (NULL: none)
  • boolean $ret: Whether to return data, instead of output
utf8_ord (line 294)

Finds the ASCII value of a utf-8 character (I think!)

  • return: ASCII value
integer utf8_ord (string $chr)
  • string $chr: Character
wrap_exec (line 137)

Execute aSpell, via piping to an output log (Windows PHP doesn't seem to allow direct output getting).

  • return: The output (false: error)
~string wrap_exec (string $cmd)
  • string $cmd: The command line

Documentation generated on Sun, 02 Jan 2011 23:25:20 +0000 by phpDocumentor 1.4.3