0 results found

tinymce.util.URI

Contribute to this page
Namespacetinymce.util
ClassURI

This class handles parsing, modification and serialization of URI/URL strings.

Public Methods

MethodDefined By
URI(u:String, s:Object) : Constucts a new URI instance.URI
getURI(nh:Boolean):void : Returns the full URI of the internal structure.URI
setPath(p:string):void : Sets the internal path part of the URI.URI
toAbsolute(u:String, nh:Boolean):String : Converts the specified URI into a absolute URI based on the current URI instance location.URI
toAbsPath(base:String, path:String):void : Converts a relative path into a absolute path.URI
toRelative(u:String):String : Converts the specified URI into a relative URI based on the current URI instance location.URI
toRelPath(base:String, path:String):void : Converts a absolute path into a relative path.URI

Method details

URI

public function URI(u:String, s:Object)
Constucts a new URI instance.

Parameters

ParamDetail
u:StringURI string to parse.
s:ObjectOptional settings object.

getURI

public function getURI(nh:Boolean):void
Returns the full URI of the internal structure.

Parameters

ParamDetail
nh:BooleanOptional no host and protocol part. Defaults to false.

setPath

public function setPath(p:string):void
Sets the internal path part of the URI.

Parameters

ParamDetail
p:stringPath string to set.

toAbsolute

public function toAbsolute(u:String, nh:Boolean):String
Converts the specified URI into a absolute URI based on the current URI instance location.

Parameters

ParamDetail
u:StringURI to convert into a relative path/URI.
nh:BooleanNo host and protocol prefix.

Returns
String - Absolute URI from the point specified in the current URI instance.

Example

toAbsPath

public function toAbsPath(base:String, path:String):void
Converts a relative path into a absolute path.

Parameters

ParamDetail
base:StringBase point to convert the path from.
path:StringRelative path to convert into an absolute path.

toRelative

public function toRelative(u:String):String
Converts the specified URI into a relative URI based on the current URI instance location.

Parameters

ParamDetail
u:StringURI to convert into a relative path/URI.

Returns
String - Relative URI from the point specified in the current URI instance.

Example

toRelPath

public function toRelPath(base:String, path:String):void
Converts a absolute path into a relative path.

Parameters

ParamDetail
base:StringBase point to convert the path from.
path:StringAbsolute path to convert into a relative path.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.