Inherited Variables
Inherited Constants
Inherited Methods
Class: Sabre_DAV_ServerPlugin
- Sabre_DAV_ServerPlugin::getFeatures()
- This method should return a list of server-features.
- Sabre_DAV_ServerPlugin::getHTTPMethods()
- Use this method to tell the server this plugin defines additional HTTP methods.
- Sabre_DAV_ServerPlugin::initialize()
- This initializes the plugin.
Class Details
Temporary File Filter Plugin
The purpose of this filter is to intercept some of the garbage files operation systems and applications tend to generate when mounting a WebDAV share as a disk.
It will intercept these files and place them in a separate directory. these files are not deleted automatically, so it is adviceable to delete these after they are not accessed for 24 hours.
Currently it supports: * OS/X style resource forks and .DS_Store * desktop.ini and Thumbs.db (windows) * .*.swp (vim temporary files) * .dat.* (smultron temporary files)
Tags:
- author - Evert Pot (http://www.rooftopsolutions.nl/)
- copyright - Copyright (C) 2007-2010 Rooftop Solutions. All rights reserved.
- license - Modified BSD License
[ Top ]
Class Variables
Class Methods
__construct
void __construct(
[string
$dataDir = null])
[line 54]
Creates the plugin.
Make sure you specify a directory for your files. If you don't, we will use PHP's directory for session-storage instead, and you might not want that.
Tags:
- access - public
Parameters:
- string $dataDir -
[ Top ]
beforeCreateFile
bool beforeCreateFile(
string
$uri, resource
$data)
[line 117]
This method is invoked if some subsystem creates a new file.
This is used to deal with HTTP LOCK requests which create a new file.
Tags:
- access - public
Parameters:
- string $uri -
- resource $data -
[ Top ]
beforeMethod
bool beforeMethod(
string
$method)
[line 88]
This method is called before any HTTP method handler
This method intercepts any GET, DELETE, PUT and PROPFIND calls to filenames that are known to match the 'temporary file' regex.
Tags:
- access - public
Parameters:
- string $method -
[ Top ]
httpDelete
bool httpDelete(
string
$tempLocation)
[line 219]
This method handles the DELETE method.
If the file didn't exist, it will return false, which will make the standard HTTP DELETE handler kick in.
Tags:
- access - public
Parameters:
- string $tempLocation -
[ Top ]
httpGet
bool httpGet(
string
$tempLocation)
[line 173]
This method handles the GET method for temporary files.
If the file doesn't exist, it will return false which will kick in the regular system for the GET method.
Tags:
- access - public
Parameters:
- string $tempLocation -
[ Top ]
httpPropfind
void httpPropfind(
string
$tempLocation)
[line 241]
This method handles the PROPFIND method.
It's a very lazy method, it won't bother checking the request body for which properties were requested, and just sends back a default set of properties.
Tags:
- access - public
Parameters:
- string $tempLocation -
[ Top ]
httpPut
bool httpPut(
string
$tempLocation)
[line 193]
This method handles the PUT method.
Tags:
- access - public
Parameters:
- string $tempLocation -
[ Top ]
initialize
void initialize(
Sabre_DAV_Server
$server)
[line 71]
Initialize the plugin
This is called automatically be the Server class after this plugin is added with Sabre_DAV_Server::addPlugin()
Tags:
- access - public
Overrides Sabre_DAV_ServerPlugin::initialize() (This initializes the plugin.)
Parameters:
- Sabre_DAV_Server $server -
[ Top ]
isTempFile
boolean|string isTempFile(
string
$path)
[line 138]
This method will check if the url matches the temporary file pattern if it does, it will return an path based on $this->dataDir for the temporary file storage.
Tags:
- access - protected
Parameters:
- string $path -
[ Top ]