Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DefinedRequest extends AbstractRequest implements \Intahwebz\Request {
- function setPath($path) {
- $this->path = $path;
- }
- function __construct($params) {
- $allowedParams = array(
- 'hostName',
- 'scheme',
- 'requestParams',
- 'path',
- 'port',
- 'method',
- 'clientIP',
- 'requestedFormat',
- );
- foreach ($allowedParams as $allowedParam) {
- if (array_key_exists($allowedParam, $params) == true) {
- $this->{$allowedParam} = $params[$allowedParam];
- }
- }
- }
- function getReferrer() {
- return null;
- }
- function getUploadedFile($formFileName) {
- return null;
- }
- }
- /* $requestDefine = array(
- 'hostName' => 'test.local',
- 'scheme' => 'http',
- 'requestParams' => array(),
- 'port' => 80,
- 'method' => 'GET',
- 'path' => '/ThisPathDoesNotExist',
- );
- $blankRequest = new DefinedRequest($requestDefine);*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement