Login +

Reference Guide / SLS_HttpRequest

SLS_HttpRequest1 is a class that allows you to recover all the parameters passed in the URL in GET & POST methods.

Accessibility

At Controller level, you can access it directly by inheritance on SLS_Generic2Controller:

$this->_http;

At others levels (PHP), you can access it by reference to SLS_Generic2:

$this->_generic->getObjectHttpRequest();
// Or if u haven't a reference to SLS_Generic, using the singleton:
SLS_Generic::getInstance()->getObjectHttpRequest();

Data recovery

- If you want to retrieve all the parameters, you can use the getParams() function:

$this->_http->getParams($type="ALL");

- If you want to retrieve a particular parameter, you can use the getParam() function:

$this->_http->getParam($param, $type="ALL");

Foreach function, you can specify the parameter $type which restricts the protocol. The possible values ​​are 'ALL', 'GET', 'POST', 'FILE'.

References

  1. SLS_HttpRequest - Tool SLS_HttpRequest - Http Request Treatment
  2. SLS_Generic - Generic Class - Used eveywhere in the application