Moodle  2.2.1
http://www.collinsharper.com
HTTP_WebDAV_Server Class Reference

Public Member Functions

 HTTP_WebDAV_Server ()
 ServeRequest ()
 http_OPTIONS ()
 http_PROPFIND ()
 http_PROPPATCH ()
 http_MKCOL ()
 http_GET ()
 _get_ranges (&$options)
 _multipart_byterange_header ($mimetype=false, $from=false, $to=false, $total=false)
 http_HEAD ()
 http_PUT ()
 http_DELETE ()
 http_COPY ()
 http_MOVE ()
 http_LOCK ()
 http_UNLOCK ()
 _copymove ($what)
 _allow ()
 mkprop ()
 _check_auth ()
 _new_uuid ()
 _new_locktoken ()
 _if_header_lexer ($string, &$pos)
 _if_header_parser ($str)
 _check_if_header_conditions ()
 _check_uri_condition ($uri, $condition)
 _check_lock_status ($path, $exclusive_only=false)
 lockdiscovery ($path)
 http_status ($status)
 _urlencode ($url)
 _urldecode ($path)
 _prop_encode ($text)
 _slashify ($path)
 _unslashify ($path)
 _mergePathes ($parent, $child)
 bytes ($str)

Data Fields

 $uri
 $base_uri
 $path
 $http_auth_realm = "PHP WebDAV"
 $dav_powered_by = ""
 $_if_header_uris = array()
 $_http_status = "200 OK"
 $_prop_encoding = "utf-8"
 $_SERVER

Detailed Description

Definition at line 49 of file Server.php.


Member Function Documentation

_allow ( )

check for implemented HTTP methods

Parameters:
void
Returns:
array something

Definition at line 1568 of file Server.php.

Here is the caller graph for this function:

check authentication if check is implemented

Parameters:
void
Returns:
bool true if authentication succeded or not necessary

Definition at line 1630 of file Server.php.

Here is the caller graph for this function:

check if conditions from "If:" headers are meat

the "If:" header is an extension to HTTP/1.1 defined in RFC 2518 section 9.4

Parameters:
void
Returns:
void

Definition at line 1850 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_check_lock_status ( path,
exclusive_only = false 
)
Parameters:
stringpath of resource to check
boolexclusive lock?

Definition at line 1920 of file Server.php.

Here is the caller graph for this function:

_check_uri_condition ( uri,
condition 
)

Check a single URI condition parsed from an if-header

Check a single URI condition parsed from an if-header

Parameters:
string$uriURI to check
string$conditionCondition to check for this URI
Returns:
bool Condition check result

Definition at line 1899 of file Server.php.

Here is the caller graph for this function:

_copymove ( what)

Definition at line 1508 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_get_ranges ( &$  options)

parse HTTP Range: header

Parameters:
arrayoptions array to store result in
Returns:
void

Definition at line 1041 of file Server.php.

Here is the caller graph for this function:

_if_header_lexer ( string,
&$  pos 
)
Parameters:
stringheader string to parse
intcurrent parsing position
Returns:
array next token (type and value)

Definition at line 1712 of file Server.php.

Here is the caller graph for this function:

_if_header_parser ( str)

parse If: header

Parameters:
stringheader string
Returns:
array URIs and their conditions

Definition at line 1766 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_mergePathes ( parent,
child 
)

Merge two pathes, make sure there is exactly one slash between them

Parameters:
stringparent path
stringchild path
Returns:
string merged path

Definition at line 2097 of file Server.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_multipart_byterange_header ( mimetype = false,
from = false,
to = false,
total = false 
)

generate separator headers for multipart response

first and last call happen without parameters to generate the initial header and closing sequence, all calls inbetween require content mimetype, start and end byte position and optionaly the total byte length of the requested resource

Parameters:
stringmimetype
intstart byte position
intend byte position
inttotal resource byte size

Definition at line 1075 of file Server.php.

Here is the caller graph for this function:

create a new opaque lock token as defined in RFC2518

Parameters:
void
Returns:
string new RFC2518 opaque lock token

Definition at line 1696 of file Server.php.

Here is the caller graph for this function:

_new_uuid ( )

generate Unique Universal IDentifier for lock token

Parameters:
void
Returns:
string a new UUID

Definition at line 1666 of file Server.php.

_prop_encode ( text)

UTF-8 encode property values if not already done so

Parameters:
stringtext to encode
Returns:
string utf-8 encoded text

Definition at line 2049 of file Server.php.

Here is the caller graph for this function:

_slashify ( path)

Slashify - make sure path ends in a slash

Parameters:
stringdirectory path
Returns:
string directory path wiht trailing slash

Definition at line 2068 of file Server.php.

Here is the caller graph for this function:

_unslashify ( path)

Unslashify - make sure path doesn't in a slash

Parameters:
stringdirectory path
Returns:
string directory path wihtout trailing slash

Definition at line 2082 of file Server.php.

Here is the caller graph for this function:

_urldecode ( path)

private version of PHP urldecode

not really needed but added for completenes

Parameters:
stringURL to decode
Returns:
string decoded URL

Definition at line 2038 of file Server.php.

Here is the caller graph for this function:

_urlencode ( url)

private minimalistic version of PHP urlencode()

only blanks, percent and XML special chars must be encoded here full urlencode() encoding confuses some clients ...

Parameters:
stringURL to encode
Returns:
string encoded URL

Definition at line 2020 of file Server.php.

Here is the caller graph for this function:

bytes ( str)

mbstring.func_overload save strlen version: counting the bytes not the chars

Parameters:
string$str
Returns:
int

Definition at line 2112 of file Server.php.

Here is the caller graph for this function:

http_COPY ( )

COPY method handler

Parameters:
void
Returns:
void

Definition at line 1327 of file Server.php.

Here is the call graph for this function:

DELETE method handler

Parameters:
void
Returns:
void

Definition at line 1292 of file Server.php.

Here is the call graph for this function:

http_GET ( )

GET method handler

Parameters:
void
Returns:
void

Definition at line 919 of file Server.php.

Here is the call graph for this function:

http_HEAD ( )

HEAD method handler

Parameters:
void
Returns:
void

Definition at line 1114 of file Server.php.

Here is the call graph for this function:

http_LOCK ( )

LOCK method handler

Parameters:
void
Returns:
void

Definition at line 1365 of file Server.php.

Here is the call graph for this function:

MKCOL method handler

Parameters:
void
Returns:
void

Definition at line 897 of file Server.php.

Here is the call graph for this function:

http_MOVE ( )

MOVE method handler

Parameters:
void
Returns:
void

Definition at line 1344 of file Server.php.

Here is the call graph for this function:

GET implementation

overload this method to retrieve resources from your server

Parameters:
array&$paramsArray of input and output parameters
input
  • path -

output
  • size -
Returns:
int HTTP-Statuscode PUT implementation

PUT implementation

Parameters:
array&$params
Returns:
int HTTP-Statuscode COPY implementation

COPY implementation

Parameters:
array&$params
Returns:
int HTTP-Statuscode MOVE implementation

MOVE implementation

Parameters:
array&$params
Returns:
int HTTP-Statuscode DELETE implementation

DELETE implementation

Parameters:
array&$params
Returns:
int HTTP-Statuscode PROPFIND implementation

PROPFIND implementation

Parameters:
array&$params
Returns:
int HTTP-Statuscode PROPPATCH implementation

PROPPATCH implementation

Parameters:
array&$params
Returns:
int HTTP-Statuscode LOCK implementation

LOCK implementation

Parameters:
array&$params
Returns:
int HTTP-Statuscode UNLOCK implementation

UNLOCK implementation

Parameters:
array&$params
Returns:
int HTTP-Statuscode check authentication

overload this method to retrieve and confirm authentication information

Parameters:
stringtype Authentication type, e.g. "basic" or "digest"
stringusername Transmitted username
stringpasswort Transmitted password
Returns:
bool Authentication status check lock status for a resource

overload this method to return shared and exclusive locks active for this resource

Parameters:
stringresource Resource path to check
Returns:
array An array of lock entries each consisting of 'type' ('shared'/'exclusive'), 'token' and 'timeout' OPTIONS method handler

The OPTIONS method handler creates a valid OPTIONS reply including Dav: and Allowed: heaers based on the implemented methods found in the actual instance

Parameters:
void
Returns:
void

Definition at line 503 of file Server.php.

Here is the call graph for this function:

PROPFIND method handler

Parameters:
void
Returns:
void

Definition at line 537 of file Server.php.

Here is the call graph for this function:

PROPPATCH method handler

Parameters:
void
Returns:
void

Definition at line 839 of file Server.php.

Here is the call graph for this function:

http_PUT ( )

PUT method handler

Parameters:
void
Returns:
void

Definition at line 1160 of file Server.php.

Here is the call graph for this function:

http_status ( status)

set HTTP return status and mirror it in a private header

Parameters:
stringstatus code and message
Returns:
void

Definition at line 1996 of file Server.php.

Here is the caller graph for this function:

UNLOCK method handler

Parameters:
void
Returns:
void

Definition at line 1482 of file Server.php.

Here is the call graph for this function:

Constructor

Parameters:
void

Definition at line 130 of file Server.php.

lockdiscovery ( path)

Generate lockdiscovery reply from checklock() result

Parameters:
stringresource path to check
Returns:
string lockdiscovery response

Definition at line 1949 of file Server.php.

Here is the caller graph for this function:

mkprop ( )

helper for property element creation

Parameters:
stringXML namespace (optional)
stringproperty name
stringproperty value
Returns:
array property array

Definition at line 1608 of file Server.php.

Here is the caller graph for this function:

Serve WebDAV HTTP request

dispatch WebDAV HTTP request to the apropriate method handler

Parameters:
void
Returns:
void

Definition at line 151 of file Server.php.

Here is the call graph for this function:


Field Documentation

$_http_status = "200 OK"

Definition at line 102 of file Server.php.

$_if_header_uris = array()

Definition at line 95 of file Server.php.

$_prop_encoding = "utf-8"

Definition at line 109 of file Server.php.

$_SERVER

Definition at line 119 of file Server.php.

$base_uri

Definition at line 66 of file Server.php.

$dav_powered_by = ""

Definition at line 88 of file Server.php.

$http_auth_realm = "PHP WebDAV"

Definition at line 81 of file Server.php.

$path

Definition at line 74 of file Server.php.

$uri

Definition at line 58 of file Server.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations