Webdav: ezcWebdavBasicPathFactory
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcWebdavBasicPathFactory
|
Basic path factory interface. [
source]
Implemented Interfaces
An object of this class is meant to be used in
ezcWebdavTransportOptions as the $pathFactory property. The instance of
ezcWebdavTransport utilizes the path factory to translate between external pathes/URIs and internal path representations.
This simple implementation of a path factory expects the base URI it should be working on as the ctor parameter. It will translate all incoming URIs to internal pathes and the other way round based on this basis URI.
You may want to provide custome implementations for different mappings.
Member Variables
|
protected array(string=>string) |
$baseUriParts
Result of parse_url() for the $baseUri submitted to the ctor. |
|
protected array(string=>bool) |
$collectionPathes
= array()
Caches pathes that are a collection. |
Method Summary
|
public void |
__construct(
[$baseUri = ''] )
Creates a new path factory. |
|
public string |
generateUriFromPath(
$path )
Generates a URI from a local path. |
|
public string |
parseUriToPath(
$uri )
Parses the given URI to a locally understandable path. |
Methods
__construct
void __construct(
[string
$baseUri = ''] )
Creates a new path factory.
Creates a new object to parse URIs to local pathes. The URL given as a parameter is used to strip URL/path parts from incoming URIs and add the specific parts to outgoin ones.
Parameters
| Name |
Type |
Description |
$baseUri |
string |
|
generateUriFromPath
string generateUriFromPath(
string
$path )
Generates a URI from a local path.
This method receives a local $path string, representing a node in the local WebDAV store and translates it into a full qualified URI to be used as external reference.
Parameters
| Name |
Type |
Description |
$path |
string |
|
parseUriToPath
string parseUriToPath(
string
$uri )
Parses the given URI to a locally understandable path.
This method retrieves a URI (either full qualified or relative) and translates it into a local path, which can be understood by the WebDAV elements.
A locally understandable path MUST NOT contain a trailing slash, but MUST always contain a starting slash. For the root URI the path "/" MUST be used.
Parameters
| Name |
Type |
Description |
$uri |
string |
|
Last updated: Mon, 12 Nov 2007