Functions
localpathToUri
public function localpathToUri(
$path,
Blog $blog null,
BlogEntry $entry null
)

Convert a local path to a URI in either the install root, userdata directory, or selected blog.

If a blog or entry is specified, then these will be used first when trying to resolve the URI of a relative file path.  That is, if you pass a relative path, the entry will be checked first, then the blog, then userdata and install root.

Parameters
path

The path for which to get the URI

blog

The blog in which to search

entry

The entry in which to search

Returns

String containing the URI or the unmodified path if it could not be converted.

absoluteLocalpathToUri
public function absoluteLocalpathToUri(
$path
)

Convert an absolute path to a URI.  This will search for the file in all registered blogs as well as userdata and install root

Parameters
path

The path to convert ot a URI

Returns

A string containing the URI or the unmodified path if resolution failed

uriToLocalpath
public function uriToLocalpath(
$uri,
Blog $blog null
)

Convert a URI into a local path, based on the registered blogs, userdata, and install root directories

Parameters
uri

The URI string to convert to a local path

blog

The optional blog

Returns

String containing the local path or the unmodified URI if resolution failed