| Total Complexity | 6 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 6 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 15 | class StaticProvider implements Provider |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Create the provider with a set of static references, i.e. mappings from name to url. |
||
| 19 | * |
||
| 20 | * @param \Symfony\Component\Routing\RouterInterface $router |
||
| 21 | * @param array $refs |
||
| 22 | 1 | */ |
|
| 23 | public function __construct(RouterInterface $router, array $refs = array()) |
||
| 24 | 1 | { |
|
| 25 | 1 | $this->refs = $refs; |
|
|
|
|||
| 26 | 1 | $this->router = $router; |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Add the array as references |
||
| 31 | * |
||
| 32 | * @param array $refs |
||
| 33 | * @return void |
||
| 34 | 1 | */ |
|
| 35 | public function addAll(array $refs) |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Add a single reference |
||
| 42 | * |
||
| 43 | * @param string $name |
||
| 44 | * @param string $value |
||
| 45 | * @return void |
||
| 46 | 1 | */ |
|
| 47 | public function add($name, $value) |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @{inheritDoc} |
||
| 54 | 1 | */ |
|
| 55 | public function supports($object) |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @{inheritDoc} |
||
| 62 | 1 | */ |
|
| 63 | public function url($object, array $options = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) |
||
| 68 |