Skip to content

Commit

Permalink
Add Request wrapper
Browse files Browse the repository at this point in the history
To to have easy api for parameters
  • Loading branch information
glensc committed Oct 9, 2020
1 parent d2f3316 commit ab4066f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Xhgui/Request.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace XHGui;

use Slim\Http\Request as SlimRequest;

/**
* Class making it convenient to access request parameters
*/
class Request extends SlimRequest
{
//checks _GET [IS PSR-7 compliant]
public function get(string $key)
{
return $this->getQueryParams()[$key];
}
}

0 comments on commit ab4066f

Please sign in to comment.