SMWAskPage Class Reference

List of all members.

Public Member Functions

 __construct ()
 Constructor.
 execute ($p)
 Main entrypoint for the special page.

Protected Member Functions

 extractQueryParameters ($p)
 This code rather hacky since there are many ways to call that special page, the most involved of which is the way that this page calls itself when data is submitted via the form (since the shape of the parameters then is governed by the UI structure, as opposed to being governed by reason).
 makeHTMLResult ()
 TODO: document.
 getInputForm ($printoutstring, $urltail)
 Generates the Search Box UI.
 getNavigationBar (SMWQueryResult $res, array $urlArgs)
 Build the navigation for some given query result, reuse url-tail parameters.
 showFormatOptions ($format, array $paramValues)
 Display a form section showing the options for a given format, based on the getParameters() value for that format's query printer.
 showFormatOption (Parameter $parameter, $currentValue)
 Get the HTML for a single parameter input.

Static Protected Member Functions

static addAutocompletionJavascriptAndCSS ()
 Creates and adds the JavaScript and JS needed for autocompletion to $wgOut.
static getEmbedToggle ()
 TODO: document.

Protected Attributes

 $m_querystring = ''
 $m_params = array()
 $m_printouts = array()
 $m_editquery = false


Detailed Description

Definition at line 18 of file SMW_SpecialAsk.php.


Constructor & Destructor Documentation

SMWAskPage::__construct (  ) 

Constructor.

Definition at line 28 of file SMW_SpecialAsk.php.


Member Function Documentation

SMWAskPage::execute ( p  ) 

Main entrypoint for the special page.

Parameters:
string $p

Definition at line 37 of file SMW_SpecialAsk.php.

References $smwgQEnabled, SMWOutputs::commitToOutputPage(), extractQueryParameters(), makeHTMLResult(), and showFormatOptions().

SMWAskPage::extractQueryParameters ( p  )  [protected]

This code rather hacky since there are many ways to call that special page, the most involved of which is the way that this page calls itself when data is submitted via the form (since the shape of the parameters then is governed by the UI structure, as opposed to being governed by reason).

Parameters:
string $p

Definition at line 69 of file SMW_SpecialAsk.php.

References $smwgQMaxInlineLimit, SMWInfolink::decodeParameters(), and SMWQueryProcessor::processFunctionParams().

Referenced by execute().

static SMWAskPage::addAutocompletionJavascriptAndCSS (  )  [static, protected]

Creates and adds the JavaScript and JS needed for autocompletion to $wgOut.

Uses the MW API to get suggestions for properties. Test for non-english wikis, add caching on client to improve performance

Since:
1.5.2

* extending jquery functions for custom autocomplete matching */

Definition at line 173 of file SMW_SpecialAsk.php.

References $smwgScriptPath, and END.

SMWAskPage::makeHTMLResult (  )  [protected]

TODO: document.

Definition at line 286 of file SMW_SpecialAsk.php.

References $smwgAutocompleteInSpecialAsk, END, simplejson::encoder::text, and scraper::url.

Referenced by execute().

SMWAskPage::getInputForm ( printoutstring,
urltail 
) [protected]

Generates the Search Box UI.

Parameters:
string $printoutstring
string $urltail
Returns:
string

Definition at line 491 of file SMW_SpecialAsk.php.

static SMWAskPage::getEmbedToggle (  )  [static, protected]

TODO: document.

Returns:
string

Definition at line 624 of file SMW_SpecialAsk.php.

SMWAskPage::getNavigationBar ( SMWQueryResult res,
array $  urlArgs 
) [protected]

Build the navigation for some given query result, reuse url-tail parameters.

Parameters:
SMWQueryResult $res
array $urlArgs
Returns:
string

Definition at line 646 of file SMW_SpecialAsk.php.

References $smwgQMaxInlineLimit.

SMWAskPage::showFormatOptions ( format,
array $  paramValues 
) [protected]

Display a form section showing the options for a given format, based on the getParameters() value for that format's query printer.

Parameters:
string $format
array $paramValues The current values for the parameters (name => value)
Returns:
string

Definition at line 736 of file SMW_SpecialAsk.php.

References SMWQueryProcessor::getParameters(), SMWQueryProcessor::getResultPrinter(), and SMWQueryProcessor::SPECIAL_PAGE.

Referenced by execute().

SMWAskPage::showFormatOption ( Parameter $  parameter,
currentValue 
) [protected]

Get the HTML for a single parameter input.

Since:
1.6
Parameters:
Parameter $parameter
mixed $currentValue
Returns:
string

Definition at line 808 of file SMW_SpecialAsk.php.


Member Data Documentation

SMWAskPage::$m_querystring = '' [protected]

Definition at line 20 of file SMW_SpecialAsk.php.

SMWAskPage::$m_params = array() [protected]

Definition at line 21 of file SMW_SpecialAsk.php.

SMWAskPage::$m_printouts = array() [protected]

Definition at line 22 of file SMW_SpecialAsk.php.

SMWAskPage::$m_editquery = false [protected]

Definition at line 23 of file SMW_SpecialAsk.php.


The documentation for this class was generated from the following file:

Generated on Sun Mar 18 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6