Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
chained_resources_locator
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 2
12
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 locate_resources
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2/**
3*
4* This file is part of the phpBB Forum Software package.
5*
6* @copyright (c) phpBB Limited <https://www.phpbb.com>
7* @license       GNU General Public License, version 2 (GPL-2.0)
8*
9* For full copyright and license information, please see
10* the docs/CREDITS.txt file.
11*
12*/
13
14namespace phpbb\routing\resources_locator;
15
16class chained_resources_locator implements resources_locator_interface
17{
18    /**
19     * @var resources_locator_interface[]
20     */
21    protected $locators;
22
23    /**
24     * Construct method
25     *
26     * @param resources_locator_interface[]    $locators    Locators
27     */
28    public function __construct($locators)
29    {
30        $this->locators        = $locators;
31    }
32
33    /**
34     * {@inheritdoc}
35     */
36    public function locate_resources()
37    {
38        $resources = [];
39
40        foreach ($this->locators as $locator)
41        {
42            $resources = array_merge($resources, $locator->locate_resources());
43        }
44
45        return $resources;
46    }
47}