Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Page_Remote_Content Class Reference
Inheritance diagram for Page_Remote_Content:
Page Asset MySource_Object

Public Member Functions

 __construct ($assetid=0)
 
 printFrontend ()
 
 printBody ()
 
 _process ()
 
 _transformContent (&$content)
 
 _addInputFileNames (&$content)
 
 _shouldPassStraightThrough ($headers)
 
 _trimContent (&$response_body)
 
 _rewriteURLs (&$content)
 
 _stripAllImages (&$content)
 
 _doTagReplacements (&$content)
 
 _imageButtonReplace ($input_string, $default_button_name='Submit Button')
 
 _imageStrip ($image_string, $default_image_name='Image')
 
 _makeFullURL ($parsed_fetch_url, &$url)
 
 _makeProperPath ($path='')
 
 _encodeHash ($url, $transformations=Array())
 
 _decodeHash ($hash)
 
 isUrlAllowed ($url)
 
- Public Member Functions inherited from Page
 __construct ($assetid=0)
 
 _getAllowedLinks ()
 
 printBody ()
 
- Public Member Functions inherited from Asset
 Asset ($assetid=0)
 
 create (Array &$link)
 
 load ($assetid)
 
 _loadDataPaths ()
 
 reload ()
 
 canDelete ()
 
 delete ($release_lock=TRUE, $check_locked=TRUE)
 
 useSystemVersion ()
 
 loadSystemVersion ()
 
 saveSystemVersion ()
 
 clearSystemVersion ()
 
 revertToSystemVersion ()
 
 revertNoticeLinksToSystemVersion ()
 
 _updated ($update_parents=TRUE)
 
 type ()
 
 getTypeAncestors ($include_asset=TRUE)
 
 incrementVersion ($number='micro', $update_parents=TRUE)
 
 getLanguages ()
 
 setLanguages (Array $languages)
 
 setCharset ($charset)
 
 setForceSecure ($force_secure)
 
 remapAssetids (Array $map)
 
 morph ($new_type_code)
 
 _morphCleanup ($new_type_code)
 
 onRequestKeywords (Asset $broadcaster, Array $vars=Array())
 
 canClone ()
 
 cloneComponents (Asset $clone, Array $components, $override=FALSE)
 
 cloneComponentsAdditional (Asset $clone, Array $components)
 
 cloneLinks (Asset $clone)
 
 getStatus ()
 
 getAvailableStatii ()
 
 getStatusDescription ()
 
 processStatusChange ($new_status, $update_parents=TRUE, $run_updated=TRUE)
 
 setDate ($date_type, $time=NULL, $userid=NULL)
 
 lockTypes ()
 
 canForceablyAcquireLock ($lock_type)
 
 getEditingLocks ($keywords)
 
 _getAllowedLinks ()
 
 createLink (Asset $minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE, $locked=0)
 
 prepareLink (Asset $asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive)
 
 canCreateLink (Asset $minor, $link_type, $exclusive)
 
 canMoveLink (Asset $minor, Asset $old_major, $link_type)
 
 describeLink ($linkid)
 
 isDeletableLink ($linkid)
 
 canDeleteLink ($linkid)
 
 deleteLink ($linkid, $check_locked=TRUE)
 
 linksUpdated ()
 
 canCloneLink ()
 
 saveAttributes ($dont_run_updated=FALSE, $log_message=TRUE)
 
 setAttrValue ($name, $value)
 
 attr ($name)
 
attrByRef ($name)
 
 getAttribute ($name, $mute_errors=FALSE)
 
 getAssetKeywords ($descriptions=FALSE)
 
 getAvailableKeywords ()
 
 getKeywordReplacement ($keyword)
 
 getAssetWebPathKeywordReplacement ()
 
 getCustomKeywordReplacements ($keywords=Array(), $invoke_backend=FALSE)
 
 processCustomKeywords ($keywords=Array())
 
 getContent ()
 
 setContent ()
 
 getEffectiveLastUpdatedTime ($assetids)
 
 readAccess (Array $assetids=Array())
 
 writeAccess ($lock_type='', Array $assetids=Array(), $only_workflow=TRUE)
 
 adminAccess ($lock_type='', Array $assetids=Array())
 
 backendAccess ()
 
 liveEditAccess ($lock_type)
 
 canliveEdit ($lock_type)
 
 effectiveUnrestricted ()
 
 checkAccess ($perm, $lock_type, Array $assetids=Array(), $only_workflow=TRUE)
 
 accessEffective ()
 
 permissionsUpdated ()
 
 printFrontend ()
 
 printFrontendAsset (Asset $asset, $design=NULL)
 
 getValidProtocols ()
 
 printHead ()
 
 printBody ()
 
 getCurrentPaintLayoutName ()
 
 getCurrentDesignName ()
 
 printBodyWithPaintLayout ($layout_id='')
 
 initLimbo ()
 
 printLimbo ()
 
 paintBackend (Backend_Outputter $o)
 
 getPrefix ()
 
 processBackend (Backend_Outputter $o, Array &$link)
 
 getEI ()
 
 getEditFns ()
 
 getBackendHref ($screen='', $backend_page=TRUE)
 
 getURL ($base_url=NULL, $ignore_rollback=FALSE, $base_contextid=NULL)
 
 getURLs ()
 
 getHref ($base_url=NULL, $ignore_rollback=FALSE)
 
 getWebDataPath ()
 
 getWebPaths ()
 
 saveWebPaths ($paths, $auto_add_remaps=TRUE)
 
 getLookups ($field='')
 
 getDesignLookups ()
 
 getLookupValues ($inherited=NULL, $prefix='', $like_search=TRUE, $ignore_override=FALSE)
 
 deleteLookupValue ($layout_name, $layout_value)
 
 setPaintLayouts ($layouts)
 
 updateLookups ($auto_add_remaps=TRUE)
 
 setLookupValues (Array $values)
 
 getAssetStatusDescriptionKeywordReplacement ()
 
 getAssetStatusColourKeywordReplacement ()
 
 replaceKeywordsInString ($string)
 
 fastTrack ($tasks)
 
 unFastTrack ($tasks)
 
 shouldFastTrack ($task, $assetid=NULL)
 
 getFaskTrackedTaskAssetids ($task)
 
 getDependantParentsURL ()
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Data Fields

 $_transformation_options
 

Additional Inherited Members

- Protected Member Functions inherited from Page
 _preCreateCheck (Array &$link)
 
 _createAdditional (Array &$link)
 
 _getName ($short_name=FALSE)
 

Detailed Description

Definition at line 41 of file page_remote_content.inc.

Constructor & Destructor Documentation

__construct (   $assetid = 0)

Constructor

Parameters
int$assetidthe asset id to be loaded

Definition at line 60 of file page_remote_content.inc.

Member Function Documentation

_decodeHash (   $hash)

Decode a URL hash to a URL and treatment options

Parameters
string$hashThe hash value to decode
Returns
void public

Definition at line 1220 of file page_remote_content.inc.

_doTagReplacements ( $content)

Replace tags as specified by the user

Parameters
string&$contentThe content to do the tag replacements in
Returns
void private

Definition at line 993 of file page_remote_content.inc.

_encodeHash (   $url,
  $transformations = Array() 
)

Create a hash representing the URL and treatment flags supplied

Parameters
array$urlURL to encode
array$transformationsTransformations to perform when tunneling See $_transformation_options for valid values May also specify 'all' for all transformations
Returns
string private

Definition at line 1190 of file page_remote_content.inc.

_imageButtonReplace (   $input_string,
  $default_button_name = 'Submit Button' 
)

Replace image button with a regular HTML Submit button

Parameters
string$input_stringfull input tag
string$default_button_namedefault name of the button to replace the image
Returns
string private

Definition at line 1021 of file page_remote_content.inc.

_imageStrip (   $image_string,
  $default_image_name = 'Image' 
)

Strip an image

Replaces an HTML image tag with its ALT tag or a default name

Parameters
string$image_stringfull image tag
string$default_image_namedefault word to replace image with if Alt tag is not found
Returns
string private

Definition at line 1052 of file page_remote_content.inc.

_makeFullURL (   $parsed_fetch_url,
$url 
)

Turn a url into a full url, together with the host and protocol

The required missing information is taken from the parsed_fetch_url, which is a url of the remote file that references the item whose url is supplied

Parameters
array$parsed_fetch_urlfetch url that has been parsed with parse_url()
string&$urlreference to url that needs to be converted
Returns
boolean public

Definition at line 1079 of file page_remote_content.inc.

_makeProperPath (   $path = '')

Make a proper unix path

Works similar to php's realpath(), but doesn't rely on a file system Given a string representing a path, it tries to remove the relative references in short: given "/this/dir/../another/file.php" will produce "/this/another/file.php"

NOTE: paths that try to jump outside the root will produce possibly erroneous result eg.: "/root/dir/../../../another/file.php" will become "/another/file.php" this behaviour is similar to how browsers treat relative paths

Parameters
string$pathpath that needs shortening
Returns
string public

Definition at line 1138 of file page_remote_content.inc.

_process ( )

Process the remote content request and return the processed HTML

Returns: TRUE on a successful retrieval. FALSE on a failure of some sort. NULL if we have already processed the URL. This status MUST NOT be cached, and any previous success/failure result SHOULD be used.

Returns
boolean public

Definition at line 185 of file page_remote_content.inc.

_rewriteURLs ( $content)

Rewrite URLs in the content

Parameters
string&$contentthe content to rewrite URLs in
Returns
void public

Definition at line 669 of file page_remote_content.inc.

_shouldPassStraightThrough (   $headers)

Returns whether the content should be treated as binary, given the headers supplied

Parameters
array$headersThe headers returned in the HTTP response by the remote server
Returns
boolean private

Definition at line 592 of file page_remote_content.inc.

_stripAllImages ( $content)

Strip all image tags from the supplied content

Parameters
string&$contentThe content to strip image tags from
Returns
void private

Definition at line 948 of file page_remote_content.inc.

_transformContent ( $content)

Perform all the transformation of content according to the current settings

Parameters
string&$contentThe content to transform
Returns
void private

Definition at line 517 of file page_remote_content.inc.

_trimContent ( $response_body)

Trim the content to that within the selected start and end tags

Parameters
string&$response_bodyThe content to modify
Returns
void private

Definition at line 623 of file page_remote_content.inc.

isUrlAllowed (   $url)

Checks whether url is allowed by security settings

Parameters
string$urlURL to check
Returns
boolean public

Definition at line 1248 of file page_remote_content.inc.

printBody ( )

Output the content

NOTE: If called directly, this function does not allow the output of binary data because usually the output has been started before the function is called. If binary output is required, printFrontend function should be used, or _tmp variable set.

NOTE: No Output should be done after the call to _outputContent (in this function)

Returns
void public

Definition at line 132 of file page_remote_content.inc.

printFrontend ( )

Output this Asset to the Front end.

Assumes that no output is being done before it is allowed to output, so outputting binaries is allowed. Relies on printBody to do the outputting.

Returns
void public

Definition at line 77 of file page_remote_content.inc.

Field Documentation

$_transformation_options
Initial value:
= Array(
'use_design',
'rewrite_urls',
'trim_content',
'do_tag_replacements',
'replace_matrix_keywords',
'strip_images',
)

Definition at line 44 of file page_remote_content.inc.


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