TranscodingAction is an abstract class for all the transcoding actions that may be managed by a Transcoder.
A transcoding action is defined within the transcoding library as an action that converts content to match the capabilities of the device that requests the content. The capabilities of the device are retrieved from a DDR Service based on an Evidence. See apply().
The class features a generic pair/value option mechanism that may be used in concrete implementations to fine-tune the behavior of the transcoding action.
The apply() method must be implemented in concrete subclasses.
Located in /common/transcoding/transcodingaction.php (line 41)
| Class | Description |
|---|---|
| TranscodingActionSwitchTemplate | Transcoding action that switches the template to a mobile-friendly template whenever the requesting device is a "mobile" device. |
| TranscodingActionReplaceEntities | Transcoding action that translates HTML entities such as " " by their code equivalent (i.e. " ") when the requesting device supports application/xhtml+xml. |
| TranscodingActionCSSAdaptation | Transcoding action that adapts CSS content to improve content layout on mobile devices. |
| TranscodingActionPagination | Transcoding action that paginates lenghty XHTML content to speed up content delivery on mobile devices with limited bandwidth, and possibly limited memory. |
| TranscodingActionDeletePopup | Transcoding action that updates links to separate windows (i.e. popup windows) so that they open in the same window when the requesting device is a mobile device. |
| TranscodingActionResizeIMG | Transcoding action that resizes images that appear in the given HTML content to match the requesting device's list of supported image formats and screen size. |
| TranscodingActionDeleteEmbeds | Transcoding action that removes embedded elements within the content that are not allowed in XHTML Basic 1.1 when the requesting device is identified as mobile: applet, embed and iframe are removed. |
| TranscodingActionLineartables | Transcoding action that linearizes tables found in XHTML content when the requesting device does not support tables. |
| TranscodingActionDeleteScript | Transcoding action that removes scripts from the given HTML content when the requesting device does not support them. |
| TranscodingActionDeleteWordpressScripts | Transcoding action that removes registered scripts in Wordpress. |
Default DDR property reference used to identify mobile devices.
Creates an instance of the transcoding action associated with the given DDR service.
Applies the transcoding action to the given content, using the capabilities of the device identified by the given evidence.
The method must be implemented in concrete subclasses.
Retrieves the first block found in the string that matches the given list.
The method requires the blocks being looked upon to be properly nested.
Retrieves a transcoding option.
Options are just a generic pair/value settings mechanisms that may be used in concrete subclasses. In particular, options are not used within this class.
Returns the property value of the device identified by a prior call to initPropertyValues() that matches the given local property name, vocabulary IRI and aspect name.
Please note that the underlying DDR Simple API implementation may throw exceptions if the arguments are not valid.
Returns the property value of the device identified by a prior call to initPropertyValues() that matches the given local property name, vocabulary IRI and aspect name.
Please note that the underlying DDR Simple API implementation may throw exceptions if the arguments are not valid.
Converts an absolute URI to a URI relative to the given base URI, when possible.
Ensures that the given option is defined in the list of options, and is of the appropriate type. Sets the option to the given default value if the option is not in the list of options yet.
Checks the Check if default values (name, namespace and aspect) are set for a property. If not, then use the default value.
Initializes the list of capabilities of the device identified by the given Evidence.
This method must be called prior to calling getProperty().
Please note that concrete subclasses may choose to interact with the DDR service directly instead of relying on these two methods. In particular, the method is not used within this class.
Converts the given absolute URI to a local file URI, when possible.
Converts the given absolute file name to an absolute URI, when possible.
Converts the given filename to a relative or absolute URI when possible.
The relative form, where relative is to the provided base URI, is returned whenever possible. An absolute URI is returned if not.
Converts the given URI to a local file URI, when possible.
Resolves a URI against a base URI
The code is based on code provided by: alistair at 21degrees dot com dot au in the comments of http://fr2.php.net/manual/fr/function.parse-url.php and patched by: adrian-php at sixfingeredman dot net
This implementation more or less follows the "5.2 Resolving Relative References to Absolute Form" section of RFC 2395.
Sets a transcoding option.
Options are just a generic pair/value settings mechanisms that may be used in concrete subclasses. In particular, options are not used within this class.
Converts a URI previously splitted through a call to parse_url back to an absolute form.
Documentation generated on Tue, 17 Nov 2009 19:00:40 +0100 by phpDocumentor 1.4.2