Antidot PHP API  version 0.16.0
##PHP API to simplify integration of Antidot components
 All Classes Files Functions Variables Groups Pages
Public Member Functions | List of all members
AfsSpellcheckHelper Class Reference

Spellcheck helper. More...

Inheritance diagram for AfsSpellcheckHelper:
AfsHelperBase

Public Member Functions

 __construct (AfsRawAndFormattedText $raw_and_formatted, $query, $link)
 Constructs new spellcheck helper instance.
 get_raw_text ()
 Retrieves raw spellcheck text.
 get_formatted_text ()
 Retrieves raw formatted text.
 get_query ()
 Retrieves the query initialized with spellcheck result.
 get_link ()
 Retrieves the link for the new query.
 format ()
 Retrieves spellcheck reply as array.
- Public Member Functions inherited from AfsHelperBase
 __get ($name)
 Simple property helper.

Detailed Description

Spellcheck helper.

Spellcheck helper allows to get access to main spellcheck data:

Constructor & Destructor Documentation

__construct ( AfsRawAndFormattedText  $raw_and_formatted,
  $query,
  $link 
)

Constructs new spellcheck helper instance.

Parameters
$raw_and_formatted[in] instance of AfsRawAndFormattedText.
$query[in] new query initialized with spellcheck result.
$link[in] link generated from the query or null when no query coder has been provided to spellcheck manager.

Member Function Documentation

format ( )

Retrieves spellcheck reply as array.

All data are store in key => value format:

  • raw: raw text of the spellcheck reply,
  • formatted: formatted text of the spellcheck reply,
  • link: link generated from the spellcheck reply.
Returns
array filled with key and value pairs.
get_formatted_text ( )

Retrieves raw formatted text.

Returns
formatted text.
get_link ( )

Retrieves the link for the new query.

This link can be incorporated into HTML web page in order to query AFS search engine. This link is only available when the spellcheck manager has been initialized with appropriate query coder.

Returns
link.
get_query ( )

Retrieves the query initialized with spellcheck result.

This query can be used to request AFS search engine.

Returns
new query.
get_raw_text ( )

Retrieves raw spellcheck text.

Returns
raw text.