Documentation

NeedPrivileges extends Forbidden
in package

NeedPrivileges.

The 403-need privileges is thrown when a user didn't have the appropriate permissions to perform an operation

Tags
copyright

Copyright (C) fruux GmbH (https://fruux.com/)

author

Evert Pot (http://evertpot.com/)

license

http://sabre.io/license/ Modified BSD License

Table of Contents

$privileges  : array<string|int, mixed>
The privileges the user didn't have.
$uri  : string
The relevant uri.
__construct()  : mixed
Constructor.
getHTTPCode()  : int
Returns the HTTP statuscode for this exception.
getHTTPHeaders()  : array<string|int, mixed>
This method allows the exception to return any extra HTTP response headers.
serialize()  : mixed
Adds in extra information in the xml response.

Properties

$privileges

The privileges the user didn't have.

protected array<string|int, mixed> $privileges

Methods

__construct()

Constructor.

public __construct(string $uri, array<string|int, mixed> $privileges) : mixed
Parameters
$uri : string
$privileges : array<string|int, mixed>
Return values
mixed

getHTTPCode()

Returns the HTTP statuscode for this exception.

public getHTTPCode() : int
Return values
int

getHTTPHeaders()

This method allows the exception to return any extra HTTP response headers.

public getHTTPHeaders(Server $server) : array<string|int, mixed>

The headers must be returned as an array.

Parameters
$server : Server
Return values
array<string|int, mixed>

serialize()

Adds in extra information in the xml response.

public serialize(Server $server, DOMElement $errorNode) : mixed

This method adds the {DAV:}need-privileges element as defined in rfc3744

Parameters
$server : Server
$errorNode : DOMElement
Return values
mixed

Search results