Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
8 / 8 |
Route | |
100.00% |
1 / 1 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
8 / 8 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
translator | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
buildResolver | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
builder | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
buildBuilder | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
<?php | |
namespace PHPixie; | |
class Route | |
{ | |
protected $builder; | |
public function __construct() | |
{ | |
$this->builder = $this->buildBuilder(); | |
} | |
public function translator($resolver, $configData, $httpContextContainer = null) | |
{ | |
return $this->builder->translator($resolver, $configData, $httpContextContainer); | |
} | |
public function buildResolver($configData, $resolverRegistry = null) | |
{ | |
$resolvers = $this->builder->resolvers(); | |
$builder = $resolvers->builder($resolverRegistry); | |
return $builder->buildFromConfig($configData); | |
} | |
public function builder() | |
{ | |
return $this->builder; | |
} | |
protected function buildBuilder() | |
{ | |
return new Route\Builder(); | |
} | |
} |