Class RequestHTTPOptionList

Description

HTTP List header parsing/evalutation

This class can be used to parse and evaluate list headers in http requests. These are the Accept* headers.

  • todo: Add wildcard matching

Located in /phpsatk-lib/global/org.eenterphace.sat.request.http/request.http.option.list.php (line 38)


	
			
Method Summary
RequestHTTPOptionList __construct (string $string)
boolean contains (string $value)
array[string] findBestMatch (array[string] $values)
array[string=>float] getElements ()
array[string] intersect (array[string] $values)
Methods
Constructor __construct (line 55)

Initialize and parse a new list

This function takes the value of a HTTP header containing a list (e.g. Accept-*).

  • access: public
RequestHTTPOptionList __construct (string $string)
  • string $string: Header value
contains (line 130)

Checks whether the specified list item exists

  • access: public
boolean contains (string $value)
  • string $value: List item to look for
findBestMatch (line 100)

Finds the best match from the intersection of two lists.

  • access: public
array[string] findBestMatch (array[string] $values)
  • array[string] $values: Values to check for
getElements (line 118)

Gets a sorted list of all elements

Returns an array where the keys are the elements and values their quality. Sorts by quality (better comes first)

  • access: public
array[string=>float] getElements ()
intersect (line 84)

Finds matches from a list of values

Returns a list of elements which are in both lists. Sorts by the quality of the match (better matches come first).

  • access: public
array[string] intersect (array[string] $values)
  • array[string] $values: Values to check for

Documentation generated on Mon, 21 May 2007 10:35:16 +0200 by phpDocumentor 1.3.0RC5