Class TranscodingActionSwitchTemplate

Description

Transcoding action that switches the template to a mobile-friendly template whenever the requesting device is a "mobile" device.

A few options may be set through a call to TranscodingAction::setOption() if needed:

  • mobile_device: contains the DDR property reference that the transcoding must use to tell whether the requesting device is mobile or not. The action uses the is_wireless_device property of the WURFL namespace when the option is not set.
  • default: contains the name of the non-mobile template. "default" is used when the option is not set.
  • mobile: contains the name of the mobile-friendly template. "mobile" is used when the option is not set.
This transcoding action is not a normal transcoding action in the sense that it does not apply to content. It merely returns the name of the template that best matches the capabilities of the requesting device, regardless of the content it is fed with.

Located in /common/transcoding/transcodingactionswitchtemplate.php (line 48)

TranscodingAction
   |
   --TranscodingActionSwitchTemplate
Method Summary
string apply (string $content,  $evidence)
Variables
Methods
apply (line 57)

Checks the requesting device and returns the template that best matches its capabilities.

  • return: The template name to use.
  • access: public
string apply (string $content,  $evidence)
  • string $content: Unused.
  • $evidence

Redefinition of:
TranscodingAction::apply()
Applies the transcoding action to the given content, using the capabilities of the device identified by the given evidence.

Inherited Methods

Inherited From TranscodingAction

TranscodingAction::__construct()
TranscodingAction::apply()
TranscodingAction::getNextBlock()
TranscodingAction::getOption()
TranscodingAction::getPropertyValue()
TranscodingAction::getPropertyValuePr()
TranscodingAction::getRelativeUri()
TranscodingAction::initOption()
TranscodingAction::initProperty()
TranscodingAction::initPropertyValues()
TranscodingAction::mapAbsoluteUriToFile()
TranscodingAction::mapFileToAbsoluteUri()
TranscodingAction::mapFileToUri()
TranscodingAction::mapUriToFile()
TranscodingAction::resolveUri()
TranscodingAction::setOption()
TranscodingAction::unparse_url()

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