| 1 | <?php namespace Comodojo\Dispatcher\Request; |
||
| 27 | class Post { |
||
| 28 | |||
| 29 | use ParametersTrait; |
||
| 30 | |||
| 31 | protected $raw_parameters = null; |
||
| 32 | |||
| 33 | public function __construct() { |
||
| 40 | |||
| 41 | public function raw() { |
||
| 46 | |||
| 47 | private static function getParameters() { |
||
| 75 | |||
| 76 | private static function getRawParameters() { |
||
| 81 | |||
| 82 | } |
||
| 83 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: