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
GuessContentType plugin
A lot of the built-in File objects just return application/octet-stream as a content-type by default. This is a problem for some clients, because they expect a correct contenttype.
There's really no accurate, fast and portable way to determine the contenttype so this extension does what the rest of the world does, and guesses it based on the file extension.
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
$extensionMap = array(
// images
'jpg' => 'image/jpeg',
'gif' => 'image/gif',
'png' => 'image/png',
// groupware
'ics' => 'text/calendar',
'vcf' => 'text/x-vcard',
// text
'txt' => 'text/plain',
)
[line 29]
List of recognized file extensions
Feel free to add more
Tags:
- access - public
Type: array
Overrides:
[ Top ]
Class Methods
afterGetProperties
void afterGetProperties(
string
$path,
&$properties, array
$properties)
[line 66]
Handler for teh afterGetProperties event
Tags:
- access - public
Parameters:
- string $path -
- array $properties -
- &$properties -
[ Top ]
getContentType
string getContentType(
string
$fileName)
[line 88]
Simple method to return the contenttype
Tags:
- access - protected
Parameters:
- string $fileName -
[ Top ]
initialize
void initialize(
Sabre_DAV_Server
$server)
[line 51]
Initializes the plugin
Tags:
- access - public
Overrides Sabre_DAV_ServerPlugin::initialize() (This initializes the plugin.)
Parameters:
- Sabre_DAV_Server $server -
[ Top ]