[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/pear/HTTP/WebDAV/ -> Server.php (summary)

(no description)

File Size: 2130 lines (68 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTTP_WebDAV_Server:: (47 methods):
  HTTP_WebDAV_Server()
  ServeRequest()
  GET()
  PUT()
  COPY()
  MOVE()
  DELETE()
  PROPFIND()
  PROPPATCH()
  LOCK()
  UNLOCK()
  checkAuth()
  checklock()
  http_OPTIONS()
  http_PROPFIND()
  http_PROPPATCH()
  http_MKCOL()
  http_GET()
  _get_ranges()
  _multipart_byterange_header()
  http_HEAD()
  http_PUT()
  http_DELETE()
  http_COPY()
  http_MOVE()
  http_LOCK()
  http_UNLOCK()
  _copymove()
  _allow()
  mkprop()
  _check_auth()
  _new_uuid()
  _new_locktoken()
  _if_header_lexer()
  _if_header_parser()
  _check_if_header_conditions()
  _check_uri_condition()
  _check_lock_status()
  lockdiscovery()
  http_status()
  _urlencode()
  _urldecode()
  _prop_encode()
  _slashify()
  _unslashify()
  _mergePathes()
  bytes()


Class: HTTP_WebDAV_Server  - X-Ref

Virtual base class for implementing WebDAV servers

WebDAV server base class, needs to be extended to do useful work

HTTP_WebDAV_Server()   X-Ref
Constructor

param: void

ServeRequest()   X-Ref
Serve WebDAV HTTP request

dispatch WebDAV HTTP request to the apropriate method handler

param: void
return: void

GET(&$params)   X-Ref
GET implementation

overload this method to retrieve resources from your server
<br>


returns: int HTTP-Statuscode
param: array &$params Array of input and output parameters

PUT()   X-Ref
PUT implementation

PUT implementation

returns: int HTTP-Statuscode
param: array &$params

COPY()   X-Ref
COPY implementation

COPY implementation

returns: int HTTP-Statuscode
param: array &$params

MOVE()   X-Ref
MOVE implementation

MOVE implementation

returns: int HTTP-Statuscode
param: array &$params

DELETE()   X-Ref
DELETE implementation

DELETE implementation

returns: int HTTP-Statuscode
param: array &$params

PROPFIND()   X-Ref
PROPFIND implementation

PROPFIND implementation

returns: int HTTP-Statuscode
param: array &$params

PROPPATCH()   X-Ref
PROPPATCH implementation

PROPPATCH implementation

returns: int HTTP-Statuscode
param: array &$params

LOCK()   X-Ref
LOCK implementation

LOCK implementation

returns: int HTTP-Statuscode
param: array &$params

UNLOCK()   X-Ref
UNLOCK implementation

UNLOCK implementation

returns: int HTTP-Statuscode
param: array &$params

checkAuth($type, $username, $password)   X-Ref
check authentication

overload this method to retrieve and confirm authentication information

returns: bool Authentication status
param: string type Authentication type, e.g. "basic" or "digest"
param: string username Transmitted username
param: string passwort Transmitted password

checklock($resource)   X-Ref
check lock status for a resource

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

returns: array An array of lock entries each consisting
param: string resource Resource path to check

http_OPTIONS()   X-Ref
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

param: void
return: void

http_PROPFIND()   X-Ref
PROPFIND method handler

param: void
return: void

http_PROPPATCH()   X-Ref
PROPPATCH method handler

param: void
return: void

http_MKCOL()   X-Ref
MKCOL method handler

param: void
return: void

http_GET()   X-Ref
GET method handler

returns: void
param: void

_get_ranges(&$options)   X-Ref
parse HTTP Range: header

param: array options array to store result in
return: void

_multipart_byterange_header($mimetype = false, $from = false, $to=false, $total=false)   X-Ref
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

param: string  mimetype
param: int     start byte position
param: int     end   byte position
param: int     total resource byte size

http_HEAD()   X-Ref
HEAD method handler

param: void
return: void

http_PUT()   X-Ref
PUT method handler

param: void
return: void

http_DELETE()   X-Ref
DELETE method handler

param: void
return: void

http_COPY()   X-Ref
COPY method handler

param: void
return: void

http_MOVE()   X-Ref
MOVE method handler

param: void
return: void

http_LOCK()   X-Ref
LOCK method handler

param: void
return: void

http_UNLOCK()   X-Ref
UNLOCK method handler

param: void
return: void

_copymove($what)   X-Ref
No description

_allow()   X-Ref
check for implemented HTTP methods

param: void
return: array something

mkprop()   X-Ref
helper for property element creation

param: string  XML namespace (optional)
param: string  property name
param: string  property value
return: array   property array

_check_auth()   X-Ref
check authentication if check is implemented

param: void
return: bool  true if authentication succeded or not necessary

_new_uuid()   X-Ref
generate Unique Universal IDentifier for lock token

param: void
return: string  a new UUID

_new_locktoken()   X-Ref
create a new opaque lock token as defined in RFC2518

param: void
return: string  new RFC2518 opaque lock token

_if_header_lexer($string, &$pos)   X-Ref

param: string  header string to parse
param: int     current parsing position
return: array   next token (type and value)

_if_header_parser($str)   X-Ref
parse If: header

param: string  header string
return: array   URIs and their conditions

_check_if_header_conditions()   X-Ref
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

param: void
return: void

_check_uri_condition($uri, $condition)   X-Ref
Check a single URI condition parsed from an if-header

Check a single URI condition parsed from an if-header

returns: bool Condition check result
param: string $uri URI to check
param: string $condition Condition to check for this URI

_check_lock_status($path, $exclusive_only = false)   X-Ref

param: string  path of resource to check
param: bool    exclusive lock?

lockdiscovery($path)   X-Ref
Generate lockdiscovery reply from checklock() result

param: string  resource path to check
return: string  lockdiscovery response

http_status($status)   X-Ref
set HTTP return status and mirror it in a private header

param: string  status code and message
return: void

_urlencode($url)   X-Ref
private minimalistic version of PHP urlencode()

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

param: string  URL to encode
return: string  encoded URL

_urldecode($path)   X-Ref
private version of PHP urldecode

not really needed but added for completenes

param: string  URL to decode
return: string  decoded URL

_prop_encode($text)   X-Ref
UTF-8 encode property values if not already done so

param: string  text to encode
return: string  utf-8 encoded text

_slashify($path)   X-Ref
Slashify - make sure path ends in a slash

returns: string directory path wiht trailing slash
param: string directory path

_unslashify($path)   X-Ref
Unslashify - make sure path doesn't in a slash

returns: string directory path wihtout trailing slash
param: string directory path

_mergePathes($parent, $child)   X-Ref
Merge two pathes, make sure there is exactly one slash between them

param: string  parent path
param: string  child path
return: string  merged path

bytes($str)   X-Ref
mbstring.func_overload save strlen version: counting the bytes not the chars

param: string $str
return: int



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1