Gumbo_Http_Request



Http Request Class

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Implements interfaces:

Class Variables

static Gumbo_Interface_Http_Request $_instance =  null [line 40]
array $_fields = array () [line 48]
array $_map =  null [line 51]
string $_method [line 43]
string $_mode =  "request" [line 45]

Class Methods

public static Gumbo_Interface_Http_Request instance ( ) [line 71]

Singleton Pattern Method


[ Top ]
private Gumbo_Http_Request __construct ( ) [line 58]

Constructor


[ Top ]
protected void addField ( string $field ) [line 149]

Adds a status to the $_REQUEST field

Parameter(s):

  • (string) $field
  • throws:  Gumbo_Exception

[ Top ]
public mixed get ( string $field, [string $mode] ) [line 238]

Returns the value of the $_REQUEST field

Parameter(s):

  • (string) $field
  • (string) $mode
Implementation of:
Gumbo_Interface_Http_Request::get()

[ Top ]
protected array getAllFields ( ) [line 403]

Returns all the fields status codes


[ Top ]
protected string getField ( string $field ) [line 378]

Returns the status of the $_REQUEST field

Parameter(s):

  • (string) $field
  • throws:  Gumbo_Exception

[ Top ]
public array getMap ( [bool $reload] ) [line 334]

Returns an array map of User Input

Parameter(s):

  • (bool) $reload :: reloads the map
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Http_Request::getMap()

[ Top ]
public string getMethod ( ) [line 360]

Returns the HTTP request method

Implementation of:
Gumbo_Interface_Http_Request::getMethod()

[ Top ]
public string getMode ( ) [line 368]

Returns the mode return values will be retrieved from

Implementation of:
Gumbo_Interface_Http_Request::getMode()

[ Top ]
protected mixed getRaw ( string $field, [string $mode] ) [line 289]

Returns the raw data value from $_REQUEST, $_POST, $_GET, or $_COOKIE

Parameter(s):

  • (string) $field
  • (string) $mode
  • throws:  Gumbo_Exception

[ Top ]
protected bool isField ( string $field ) [line 415]

Returns if the field has been registered

Parameter(s):

  • (string) $field
  • throws:  Gumbo_Exception

[ Top ]
protected void setField ( string $field, string $code ) [line 203]

Sets a status code for a $_REQUEST field

Parameter(s):

  • (string) $field
  • (string) $code :: status code [raw|dirty|clean]
  • throws:  Gumbo_Exception

[ Top ]
public void setMode ( string $mode ) [line 174]

Sets the default return mode (request|cookie|post|get)

Parameter(s):

  • (string) $mode
  • throws:  Gumbo_Exception
Implementation of:
Gumbo_Interface_Http_Request::setMode()

[ Top ]
public void validate ( [string $field] ) [line 108]

Validates the $_REQUEST variable Constraints (if null, validates all)

Parameter(s):

  • (string) $field
Implementation of:
Gumbo_Interface_Http_Request::validate()

[ Top ]
public mixed __get ( string $fld ) [line 86]

Returns the value of the $_REQUEST field based on the mode

Parameter(s):

  • (string) $fld
Implementation of:
Gumbo_Interface_Http_Request::__get()

[ Top ]
public mixed __isset ( string $fld ) [line 95]

Returns if the field exists in the REQUEST array

Parameter(s):

  • (string) $fld
Implementation of:
Gumbo_Interface_Http_Request::__isset()

[ Top ]