Class mobileOKPythiaForMoodle

Description

The mobileOKPythiaForMoodle class contains the logic of the mobileOK Pythia plugin for Wordpress for regular non-admin pages.

The class wraps the common AskPythia and TransPythia libraries for use in Moodle.

The mobileOK Pythia plugin is designed to help generate a mobileOK version of a course.

Located in /plugins/moodle/mobileOKPythia/includes/mobileOKPythiaForMoodle.php (line 50)


	
			
Method Summary
void addPowderLink ( $powderFile)
string filter ($content $content)
string getContentType ()
Transcoder getTranscoder ($factor 0)
void init ()
void switchTemplate ()
Methods
Constructor __construct (line 82)

Creates an empty instance of the mobileOKPythia class

  • return: new mobileOKPythia instance.
  • access: public
A __construct ()
addPowderLink (line 291)

Serves the page with an HTTP Link header to a POWDER file that asserts that the blog is mobileOK.

void addPowderLink ( $powderFile)
  • $powderFile
filter (line 151)

Transcodes content before delivery.

  • return: transcoded content.
string filter ($content $content)
  • $content $content: string The content to transcode.
getContentType (line 129)

Determines the Content-Type that should be used based on the Accept HTTP header sent by the requesting device.

  • return: 'application/xhtml+xml' or 'text/html', depending on whether the requesting device supports the XHTML media type
  • access: public
string getContentType ()
getTranscoder (line 176)

Retrieves a transcoder that applies to HTML content.

The transcoding actions are selected based on the options of the plugin.

  • return: a transcoder initialized with transcoding actions.
Transcoder getTranscoder ($factor 0)
  • $factor 0
init (line 89)

Initializes this instance, i.e. prepares the identification of the requesting device.

  • access: public
void init ()
switchTemplate (line 270)

Switches template based on the requesting device.

A mobile template is used when the requesting device is identified as mobile, the regular desktop template is used otherwise.

This method is a wrapper around the TranscodingActionSwitchTemplate transcoding action.

  • access: public
void switchTemplate ()

Documentation generated on Tue, 17 Nov 2009 19:00:39 +0100 by phpDocumentor 1.4.2