BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
HttpQueryString Class Reference
Inheritance diagram for HttpQueryString:
Collaboration diagram for HttpQueryString:

Public Member Functions

 __construct ($global=null, $add=null)
 
 toArray ()
 
 toString ()
 
 __toString ()
 
 get ($key=null, $type=null, $defval=null, $delete=null)
 
 set ($params)
 
 mod ($params)
 
 getBool ($name, $defval, $delete)
 
 getInt ($name, $defval, $delete)
 
 getFloat ($name, $defval, $delete)
 
 getString ($name, $defval, $delete)
 
 getArray ($name, $defval, $delete)
 
 getObject ($name, $defval, $delete)
 
 xlate ($ie, $oe)
 
 serialize ()
 
 offsetGet ($offset)
 
 unserialize ($serialized)
 
 offsetExists ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 

Static Public Member Functions

static factory ($global, $params, $class_name)
 
static singleton ($global=null)
 

Public Attributes

const TYPE_BOOL = 3
 
const TYPE_INT = 1
 
const TYPE_FLOAT = 2
 
const TYPE_STRING = 6
 
const TYPE_ARRAY = 4
 
const TYPE_OBJECT = 5
 

Detailed Description

Constructor & Destructor Documentation

HttpQueryString::__construct (   $global = null,
  $add = null 
)
final

(PECL pecl_http >= 0.22.0)
HttpQueryString constructor bool $global [optional] whether to operate on $_GET and $_SERVER['QUERY_STRING']

Parameters
mixed$add[optional]

additional/initial query string parameters

Member Function Documentation

HttpQueryString::__toString ( )
Returns
string
static HttpQueryString::factory (   $global,
  $params,
  $class_name 
)
static
Parameters
$global[optional]
$params[optional]
$class_name[optional]
HttpQueryString::get (   $key = null,
  $type = null,
  $defval = null,
  $delete = null 
)

(PECL pecl_http >= 0.22.0)
Get (part of) query string string $key [optional] key of the query string param to retrieve

Parameters
mixed$type[optional]

which variable type to enforce

Parameters
mixed$defval[optional]

default value if key does not exist

Parameters
bool$delete[optional]

whether to remove the key/value pair from the query string

Returns
mixed the value of the query string param or the whole query string if no key was specified on success or defval if key does not exist.
HttpQueryString::getArray (   $name,
  $defval,
  $delete 
)
Parameters
$name
$defval[optional]
$delete[optional]
HttpQueryString::getBool (   $name,
  $defval,
  $delete 
)
Parameters
$name
$defval[optional]
$delete[optional]
HttpQueryString::getFloat (   $name,
  $defval,
  $delete 
)
Parameters
$name
$defval[optional]
$delete[optional]
HttpQueryString::getInt (   $name,
  $defval,
  $delete 
)
Parameters
$name
$defval[optional]
$delete[optional]
HttpQueryString::getObject (   $name,
  $defval,
  $delete 
)
Parameters
$name
$defval[optional]
$delete[optional]
HttpQueryString::getString (   $name,
  $defval,
  $delete 
)
Parameters
$name
$defval[optional]
$delete[optional]
HttpQueryString::mod (   $params)

(PECL pecl_http >= 1.1.0)
Modifiy query string copy mixed $params query string params to add

Returns
HttpQueryString a new HttpQueryString object
HttpQueryString::offsetExists (   $offset)

Whether a offset exists mixed $offset An offset to check for.

Returns
boolean true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

Since
5.0.0

Implements ArrayAccess.

HttpQueryString::offsetGet (   $offset)

Offset to retrieve mixed $offset The offset to retrieve.

Returns
mixed Can return all value types.
Since
5.0.0

Implements ArrayAccess.

HttpQueryString::offsetSet (   $offset,
  $value 
)

Offset to set mixed $offset The offset to assign the value to.

Parameters
mixed$value

The value to set.

Returns
void
Since
5.0.0

Implements ArrayAccess.

HttpQueryString::offsetUnset (   $offset)

Offset to unset mixed $offset The offset to unset.

Returns
void
Since
5.0.0

Implements ArrayAccess.

HttpQueryString::serialize ( )
HttpQueryString::set (   $params)

(PECL pecl_http >= 0.22.0)
Set query string params mixed $params query string params to add

Returns
string the current query string.
static HttpQueryString::singleton (   $global = null)
static

(PECL pecl_http >= 0.25.0)
HttpQueryString singleton bool $global [optional] whether to operate on $_GET and $_SERVER['QUERY_STRING']

Returns
HttpQueryString always the same HttpQueryString instance regarding the global setting.
HttpQueryString::toArray ( )

(PECL pecl_http >= 0.22.0)
Get query string as array array the array representation of the query string.

HttpQueryString::toString ( )

(PECL pecl_http >= 0.22.0)
Get query string string the string representation of the query string.

HttpQueryString::unserialize (   $serialized)

Constructs the object string $serialized The string representation of the object.

Returns
void
Since
5.1.0

Implements Serializable.

HttpQueryString::xlate (   $ie,
  $oe 
)

(PECL pecl_http >= 0.25.0)
Change query strings charset string $ie input encoding

Parameters
string$oe

output encoding

Returns
bool true on success or false on failure.

The documentation for this class was generated from the following file: