Webdav: ezcWebdavAutomaticPathFactory
[ ]
[ Clients ] [ Plugin architecture ]
[ ]
[ ]
[ ]
[ ]
Class: ezcWebdavAutomaticPathFactory
|
Path factory that automatically determines configuration. [
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 paths/URIs and internal path representations.
An instance of this class examines several server variables like
- $_SERVER['DOCUMENT_ROOT']
- $_SERVER['SCRIPT_FILENAME']
to determine the server configuration. It then examines incoming URIs to determine which parts must be stripped an reconstructs the information when serializing a path back to a URI.
Member Variables
|
protected array(string=>bool) |
$collectionPathes
= array()
Caches paths that are a collection.
Those will get a '/' appended on re-serialization. Works only if they had been unserialized before. |
|
protected string |
$serverFile
Base path on the server.
Auto-detected during __construct(). |
Method Summary
|
public void |
__construct(
)
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 path suitable to be used in the backend. |
Methods
__construct
void __construct(
)
Creates a new path factory.
Creates a new path factory to be used in
ezcWebdavServerConfiguration. This path factory automatically detects information from the running web server and automatically determines the suitable values for parsing paths and generating URIs.
generateUriFromPath
string generateUriFromPath(
string
$path )
Generates a URI from a local path.
This method receives a local $path string, representing a resource in the
ezcWebdavBackend 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 path suitable to be used in the backend.
This method retrieves a URI (either full qualified or relative) and translates it into a local path, which can be understood by the
ezcWebdavBackend instance used in the
ezcWebdavServer.
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, 09 Feb 2009