Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
6 / 6 |
UpdateContext | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
6 / 6 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
process | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
<?php | |
namespace PHPixie\HTTPProcessors\Processor; | |
class UpdateContext implements \PHPixie\Processors\Processor | |
{ | |
protected $http; | |
protected $settableContextContainer; | |
public function __construct($http, $settableContextContainer) | |
{ | |
$this->http = $http; | |
$this->settableContextContainer = $settableContextContainer; | |
} | |
public function process($serverRequest) | |
{ | |
$context = $this->http->serverRequestContext($serverRequest); | |
$this->settableContextContainer->setHttpContext($context); | |
return $serverRequest; | |
} | |
} |