Class HttpContext

Class HttpContext

HttpContext implements HttpContextInterface
Package: Http\ValueObjects
Category: System
Extends: HttpContextInterface
Located at Services/System/Http/ValueObjects/HttpContext.inc.php

Methods summary

public __construct( array $serverArray, array $getArray, array $postArray, array $cookieArray, array $sessionArray )

Initializes the http context.

public getServerItem( string $keyName ) : array|string|integer|float

Returns an item of the $_SERVER array by the given key name.

public getGetItem( string $keyName ) : array|string|integer|float

Returns an item of the $_GET array by the given key name.

public getPostItem( string $keyName ) : array|string|integer|float

Returns an item of the $_POST array by the given key name.

public getCookieItem( string $keyName ) : array|string|integer|float

Returns an item of the $_COOKIE array by the given key name.

public getSessionItem( string $keyName ) : array|string|integer|float

Returns an item of the $_SESSION array by the given key name.

public getGetArray( void ) : array

Returns an array which is equal to the global $_GET variable in an object oriented layer.

public getPostArray( void ) : array

Returns an array which is equal to the global $_POST variable in an object oriented layer.

public getServerArray( void ) : array

Returns an array which is equal to the global $_SERVER variable in an object oriented layer.

Properties summary

protected $serverArray : array

		
protected $getArray : array

		
protected $postArray : array

		
protected $cookieArray : array

		
protected $sessionArray : array