SRFCalendar Class Reference

Inherits SMWResultPrinter.

List of all members.

Public Member Functions

 getName ()
 Get a human readable label for this printer.
 getResult (SMWQueryResult $results, array $params, $outputmode)
 Main entry point: takes an SMWQueryResult and parameters given as key-value-pairs in an array, and returns the serialised version of the results, formatted as HTML or Wiki or whatever is specified.
 formatDateStr ($object)
 displayCalendar ($events)
 getParameters ()
 (non-PHPdoc)

Protected Member Functions

 setColors ($colorsText)
 handleParameters (array $params, $outputmode)
 Read an array of parameter values given as key-value-pairs and initialise internal member fields accordingly.
 getResultText (SMWQueryResult $res, $outputmode)
 (non-PHPdoc)

Static Protected Member Functions

static intToMonth ($int)

Protected Attributes

 $mTemplate
 $mUserParam
 $mRealUserLang = null


Detailed Description

Definition at line 13 of file SRF_Calendar.php.


Member Function Documentation

SRFCalendar::setColors ( colorsText  )  [protected]

Definition at line 19 of file SRF_Calendar.php.

Referenced by getResultText(), and handleParameters().

SRFCalendar::handleParameters ( array $  params,
outputmode 
) [protected]

Read an array of parameter values given as key-value-pairs and initialise internal member fields accordingly.

Possibly overwritten (extended) by subclasses.

Since:
1.6
Parameters:
array $params
$outputmode 

Reimplemented from SMWResultPrinter.

Definition at line 31 of file SRF_Calendar.php.

References simplejson::jsonfilter::factory(), and setColors().

Referenced by getResult().

SRFCalendar::getName (  ) 

Get a human readable label for this printer.

The default is to return just the format identifier. Concrete implementations may refer to messages here. The format name is normally not used in wiki text but only in forms etc. hence the user language should be used when retrieving messages.

Returns:
string

Reimplemented from SMWResultPrinter.

Definition at line 48 of file SRF_Calendar.php.

SRFCalendar::getResult ( SMWQueryResult results,
array $  params,
outputmode 
)

Main entry point: takes an SMWQueryResult and parameters given as key-value-pairs in an array, and returns the serialised version of the results, formatted as HTML or Wiki or whatever is specified.

Normally this is not overwritten by subclasses.

If the outputmode is SMW_OUTPUT_WIKI, then the function will return something that is suitable for being used in a MediaWiki parser function, i.e. a wikitext strong *or* an array with flags and the string as entry 0. See Parser::setFunctionHook() for documentation on this. In all other cases, the function returns just a string.

For outputs SMW_OUTPUT_WIKI and SMW_OUTPUT_HTML, error messages or standard "further results" links are directly generated and appended. For SMW_OUTPUT_FILE, only the plain generated text is returned.

Note:
A note on recursion: some query printers may return wiki code that comes from other pages, e.g. from templates that are used in formatting or from embedded result pages. Both kinds of pages may contain #ask queries that do again use new pages, so we must care about recursion. We do so by simply counting how often this method starts a subparse and stopping at depth 2. There is one special case: if this method is called outside parsing, and the concrete printer returns wiki text, and wiki text is requested, then we may return wiki text with sub-queries to the caller. If the caller parses this (which is likely) then this will again call us in parse-context and all recursion checks catch. Only the first level of parsing is done outside and thus not counted. Thus you effectively can get down to level 3. The basic maximal depth of 2 can be changed by setting the variable SMWResultPrinter::$maxRecursionDepth (in LocalSettings.php, after enableSemantics()). Do this at your own risk.
Parameters:
$results SMWQueryResult
$params array
$outputmode integer
Returns:
string

Reimplemented from SMWResultPrinter.

Definition at line 52 of file SRF_Calendar.php.

References getResultText(), and handleParameters().

SRFCalendar::getResultText ( SMWQueryResult res,
outputmode 
) [protected]

(non-PHPdoc)

See also:
SMWResultPrinter::getResultText()
TODO: split up megamoth

Reimplemented from SMWResultPrinter.

Definition at line 67 of file SRF_Calendar.php.

References displayCalendar(), formatDateStr(), SMWPrintRequest::PRINT_PROP, setColors(), and smwfGetLinker().

Referenced by getResult().

static SRFCalendar::intToMonth ( int  )  [static, protected]

Definition at line 224 of file SRF_Calendar.php.

SRFCalendar::formatDateStr ( object  ) 

Definition at line 243 of file SRF_Calendar.php.

Referenced by getResultText().

SRFCalendar::displayCalendar ( events  ) 

Definition at line 249 of file SRF_Calendar.php.

References $srfgScriptPath, $wgTitle, SRFCHistoricalDate::daysInMonth(), END, and scraper::form.

Referenced by getResultText().

SRFCalendar::getParameters (  ) 

(non-PHPdoc)

See also:
SMWResultPrinter::getParameters()

Reimplemented from SMWResultPrinter.

Definition at line 530 of file SRF_Calendar.php.

References SMWResultPrinter::$params.


Member Data Documentation

SRFCalendar::$mTemplate [protected]

Definition at line 15 of file SRF_Calendar.php.

SRFCalendar::$mUserParam [protected]

Definition at line 16 of file SRF_Calendar.php.

SRFCalendar::$mRealUserLang = null [protected]

Definition at line 17 of file SRF_Calendar.php.


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

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