SMQueryHandler Class Reference

List of all members.

Public Member Functions

 __construct (SMWQueryResult $queryResult, $outputmode, $linkAbsolute=false, $pageLinkText= '$1', $titleLinkSeparate=false)
 Constructor.
 setTemplate ($template)
 Sets the template.
 setIcon ($icon)
 Sets the global icon.
 setTitle ($title)
 Sets the global title.
 setText ($text)
 Sets the global text.
 setSubjectSeparator ($subjectSeparator)
 Sets the subject separator.
 setBoldSubject ($boldSubject)
 Sets if the subject should be made bold in the text.
 setShowSubject ($showSubject)
 Sets if the subject should shown in the text.
 setPageLinkText ($text)
 Sets the text for the link to the page when separate from the title.
 getLocations ()
 Gets the query result as a list of locations.

Public Attributes

 $icon = ''
 $text = ''
 $title = ''
 $titleLinkSeparate

Protected Member Functions

 findLocations ()
 Gets the query result as a list of locations.
 handleResultRow (array $row)
 Returns the locations found in the provided result row.
 handleResultSubject (SMWWikiPageValue $object)
 Handles a SMWWikiPageValue subject value.
 handleResultProperty (SMWDataValue $object, SMWPrintRequest $printRequest)
 Handles a single property (SMWPrintRequest) to be displayed for a record (SMWDataValue).
 buildLocationsList (array $locations, $title, $text, $icon, array $properties)
 Builds a set of locations with the provided title, text and icon.
 getLocationIcon (array $row)
 Get the icon for a row.

Protected Attributes

 $queryResult
 $outputmode
 $locations = false
 $template = false
 $linkAbsolute
 $pageLinkText
 $subjectSeparator = '<hr />'
 $boldSubject = true
 $showSubject = true


Detailed Description

Definition at line 14 of file SM_QueryHandler.php.


Constructor & Destructor Documentation

SMQueryHandler::__construct ( SMWQueryResult queryResult,
outputmode,
linkAbsolute = false,
pageLinkText = '$1',
titleLinkSeparate = false 
)

Constructor.

Since:
0.7.3
Parameters:
SMWQueryResult $queryResult
integer $outputmode
boolean $linkAbsolute
string $pageLinkText
boolean $titleLinkSeparate

Definition at line 122 of file SM_QueryHandler.php.

References $linkAbsolute, $outputmode, $pageLinkText, and $titleLinkSeparate.


Member Function Documentation

SMQueryHandler::setTemplate ( template  ) 

Sets the template.

Since:
1.0
Parameters:
string $template

Definition at line 138 of file SM_QueryHandler.php.

References $template.

SMQueryHandler::setIcon ( icon  ) 

Sets the global icon.

Since:
1.0
Parameters:
string $icon

Definition at line 149 of file SM_QueryHandler.php.

References $icon.

SMQueryHandler::setTitle ( title  ) 

Sets the global title.

Since:
1.0
Parameters:
string $title

Definition at line 160 of file SM_QueryHandler.php.

References $title.

SMQueryHandler::setText ( text  ) 

Sets the global text.

Since:
1.0
Parameters:
string $text

Definition at line 171 of file SM_QueryHandler.php.

References $text, and simplejson::encoder::text.

SMQueryHandler::setSubjectSeparator ( subjectSeparator  ) 

Sets the subject separator.

Since:
1.0
Parameters:
string $subjectSeparator

Definition at line 182 of file SM_QueryHandler.php.

References $subjectSeparator.

SMQueryHandler::setBoldSubject ( boldSubject  ) 

Sets if the subject should be made bold in the text.

Since:
1.0
Parameters:
string $boldSubject

Definition at line 193 of file SM_QueryHandler.php.

References $boldSubject.

SMQueryHandler::setShowSubject ( showSubject  ) 

Sets if the subject should shown in the text.

Since:
1.0
Parameters:
string $showSubject

Definition at line 204 of file SM_QueryHandler.php.

References $showSubject.

SMQueryHandler::setPageLinkText ( text  ) 

Sets the text for the link to the page when separate from the title.

Since:
1.0
Parameters:
string $text

Definition at line 215 of file SM_QueryHandler.php.

References $text.

SMQueryHandler::getLocations (  ) 

Gets the query result as a list of locations.

Since:
0.7.3
Returns:
array of MapsLocation

Definition at line 226 of file SM_QueryHandler.php.

References findLocations().

SMQueryHandler::findLocations (  )  [protected]

Gets the query result as a list of locations.

Since:
0.7.3
Returns:
array of MapsLocation

Definition at line 241 of file SM_QueryHandler.php.

References $locations, and handleResultRow().

Referenced by getLocations().

SMQueryHandler::handleResultRow ( array $  row  )  [protected]

Returns the locations found in the provided result row.

Since:
0.7.3
Parameters:
array $row Array of SMWResultArray
Returns:
array of MapsLocation

Definition at line 260 of file SM_QueryHandler.php.

References $icon, $locations, $text, $title, buildLocationsList(), getLocationIcon(), handleResultProperty(), handleResultSubject(), SMWPrintRequest::PRINT_PROP, and smwfGetLinker().

Referenced by findLocations().

SMQueryHandler::handleResultSubject ( SMWWikiPageValue object  )  [protected]

Handles a SMWWikiPageValue subject value.

Gets the plain text title and creates the HTML text with headers and the like.

Since:
1.0
Parameters:
SMWWikiPageValue $object
Returns:
array with title and text

Definition at line 315 of file SM_QueryHandler.php.

References $text, $title, SMWDataValue::getLongText(), SMWWikiPageValue::getTitle(), and smwfGetLinker().

Referenced by handleResultRow().

SMQueryHandler::handleResultProperty ( SMWDataValue object,
SMWPrintRequest printRequest 
) [protected]

Handles a single property (SMWPrintRequest) to be displayed for a record (SMWDataValue).

Since:
1.0
Parameters:
SMWDataValue $object
SMWPrintRequest $printRequest
Returns:
string

Definition at line 364 of file SM_QueryHandler.php.

References SMWPrintRequest::getHTMLText(), SMWDataValue::getLongText(), SMWDataValue::getTypeID(), and smwfGetLinker().

Referenced by handleResultRow().

SMQueryHandler::buildLocationsList ( array $  locations,
title,
text,
icon,
array $  properties 
) [protected]

Builds a set of locations with the provided title, text and icon.

Since:
1.0
Parameters:
array of MapsLocation $locations
string $title
string $text
string $icon
array $properties
Returns:
array of MapsLocation

Definition at line 432 of file SM_QueryHandler.php.

References $icon, $text, and $title.

Referenced by handleResultRow().

SMQueryHandler::getLocationIcon ( array $  row  )  [protected]

Get the icon for a row.

Since:
0.7.3
Parameters:
array $row
Returns:
string

Definition at line 470 of file SM_QueryHandler.php.

References $icon.

Referenced by handleResultRow().


Member Data Documentation

SMQueryHandler::$queryResult [protected]

Definition at line 16 of file SM_QueryHandler.php.

SMQueryHandler::$outputmode [protected]

Definition at line 17 of file SM_QueryHandler.php.

Referenced by __construct().

SMQueryHandler::$locations = false [protected]

Definition at line 19 of file SM_QueryHandler.php.

Referenced by findLocations(), and handleResultRow().

SMQueryHandler::$template = false [protected]

Definition at line 28 of file SM_QueryHandler.php.

Referenced by setTemplate().

SMQueryHandler::$icon = ''

Definition at line 37 of file SM_QueryHandler.php.

Referenced by buildLocationsList(), getLocationIcon(), handleResultRow(), and setIcon().

SMQueryHandler::$text = ''

SMQueryHandler::$title = ''

SMQueryHandler::$titleLinkSeparate

Definition at line 64 of file SM_QueryHandler.php.

Referenced by __construct().

SMQueryHandler::$linkAbsolute [protected]

Definition at line 73 of file SM_QueryHandler.php.

Referenced by __construct().

SMQueryHandler::$pageLinkText [protected]

Definition at line 82 of file SM_QueryHandler.php.

Referenced by __construct().

SMQueryHandler::$subjectSeparator = '<hr />' [protected]

Definition at line 91 of file SM_QueryHandler.php.

Referenced by setSubjectSeparator().

SMQueryHandler::$boldSubject = true [protected]

Definition at line 100 of file SM_QueryHandler.php.

Referenced by setBoldSubject().

SMQueryHandler::$showSubject = true [protected]

Definition at line 109 of file SM_QueryHandler.php.

Referenced by setShowSubject().


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