Debug
extends ServerPlugin
in package
SabreDav debug plugin class.
Table of Contents
- DEBUG_FILE = 'cache/logs/davRequests.log'
- Debug file path.
- EXCEPTION_FILE = 'cache/logs/davExceptions.log'
- Exception file path.
- $request : string
- Request body.
- $response : string
- Response body.
- $server : Server
- Reference to server object.
- afterResponse() : bool
- Places a list of headers.
- beforeMethod() : bool
- Force user authentication.
- exception() : bool
- This function will cause the "exception" event to occur as soon as the error document is returned.
- exceptionErrorHandler() : void
- Mapping PHP errors to exceptions.
- getPluginInfo() : array<string|int, mixed>
- Returns a bunch of meta-data about the plugin.
- getPluginName() : string
- Returns a plugin name.
- initialize() : mixed
- Initializes selected functions.
Constants
DEBUG_FILE
Debug file path.
public
string
DEBUG_FILE
= 'cache/logs/davRequests.log'
EXCEPTION_FILE
Exception file path.
public
string
EXCEPTION_FILE
= 'cache/logs/davExceptions.log'
Properties
$request
Request body.
protected
string
$request
$response
Response body.
protected
string
$response
$server
Reference to server object.
protected
Server
$server
Methods
afterResponse()
Places a list of headers.
public
afterResponse(RequestInterface $request, ResponseInterface $response) : bool
Parameters
- $request : RequestInterface
- $response : ResponseInterface
Return values
bool —beforeMethod()
Force user authentication.
public
beforeMethod(RequestInterface $request, ResponseInterface $response) : bool
Parameters
- $request : RequestInterface
- $response : ResponseInterface
Return values
bool —exception()
This function will cause the "exception" event to occur as soon as the error document is returned.
public
exception(Exception $e) : bool
Parameters
- $e : Exception
Return values
bool —exceptionErrorHandler()
Mapping PHP errors to exceptions.
public
static exceptionErrorHandler(int $no, string $str, string $file, int $line) : void
While this is not strictly needed, it makes a lot of sense to do so. If an E_NOTICE or anything appears in your code, this allows SabreDAV to intercept the issue and send a proper response back to the client (HTTP/1.1 500).
Parameters
- $no : int
- $str : string
- $file : string
- $line : int
Tags
Return values
void —getPluginInfo()
Returns a bunch of meta-data about the plugin.
public
getPluginInfo() : array<string|int, mixed>
Providing this information is optional, and is mainly displayed by the Browser plugin.
The description key in the returned array may contain html and will not be sanitized.
Return values
array<string|int, mixed> —getPluginName()
Returns a plugin name.
public
getPluginName() : string
Using this name other plugins will be able to access other plugins using \Sabre\DAV\Server::getPlugin
Return values
string —initialize()
Initializes selected functions.
public
initialize(Server $server) : mixed
Parameters
- $server : Server