| Conditions | 1 |
| Paths | 1 |
| Total Lines | 28 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function __construct(array $handlers = array()) |
||
| 29 | { |
||
| 30 | $this->addHandler('body', new PropertyHandler\RawBody()); |
||
| 31 | |||
| 32 | $this->addHandler( |
||
| 33 | 'contentType', |
||
| 34 | new PropertyHandler\Override( |
||
| 35 | array( |
||
| 36 | new PropertyHandler\Server('CONTENT_TYPE'), |
||
| 37 | new PropertyHandler\Server('HTTP_CONTENT_TYPE'), |
||
| 38 | ) |
||
| 39 | ) |
||
| 40 | ); |
||
| 41 | |||
| 42 | $this->addHandler( |
||
| 43 | 'method', |
||
| 44 | new PropertyHandler\Override( |
||
| 45 | array( |
||
| 46 | new PropertyHandler\Server('HTTP_X_HTTP_METHOD_OVERRIDE'), |
||
| 47 | new PropertyHandler\Server('REQUEST_METHOD'), |
||
| 48 | ) |
||
| 49 | ) |
||
| 50 | ); |
||
| 51 | |||
| 52 | $this->addHandler('destination', new PropertyHandler\Server('HTTP_DESTINATION')); |
||
| 53 | |||
| 54 | parent::__construct($handlers); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.