Zeta Components Manual :: Docs For Class ezcWebdavAutomaticPathFactory
Webdav::ezcWebdavAutomaticPathFactory
Class ezcWebdavAutomaticPathFactory
Path factory that automatically determines configuration.
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']
Source for this file: /Webdav/src/path_factories/automatic.php
Implements interfaces:
Version: | //autogentag// |
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
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
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 |
Implementation of:
Method | Description |
---|---|
ezcWebdavPathFactory::generateUriFromPath() |
Generates a URI from a local path. |
parseUriToPath
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 |
Implementation of:
Method | Description |
---|---|
ezcWebdavPathFactory::parseUriToPath() |
Parses the given URI to a path suitable to be used in the backend. |