Advertisement
Danack

DefinedRequest

Nov 1st, 2013
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. class DefinedRequest extends AbstractRequest implements \Intahwebz\Request {
  2.  
  3. function setPath($path) {
  4. $this->path = $path;
  5. }
  6.  
  7. function __construct($params) {
  8.  
  9. $allowedParams = array(
  10. 'hostName',
  11. 'scheme',
  12. 'requestParams',
  13. 'path',
  14. 'port',
  15. 'method',
  16. 'clientIP',
  17. 'requestedFormat',
  18. );
  19.  
  20. foreach ($allowedParams as $allowedParam) {
  21. if (array_key_exists($allowedParam, $params) == true) {
  22. $this->{$allowedParam} = $params[$allowedParam];
  23. }
  24. }
  25. }
  26.  
  27. function getReferrer() {
  28. return null;
  29. }
  30. function getUploadedFile($formFileName) {
  31. return null;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement