| 1 | <?php |
||
| 12 | final class ConfigProvider implements TenantProvider |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $path; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Finder |
||
| 21 | */ |
||
| 22 | private $finder; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $file_pattern; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $path |
||
| 31 | */ |
||
| 32 | public function __construct($path, $file_pattern = '/^config_tenant_(?P<tenant>.+?)\.(.*?)$/', Finder $finder = null) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @inheritDoc |
||
| 47 | */ |
||
| 48 | public function loadTenants() { |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Sets path |
||
| 75 | * @param string $path |
||
| 76 | * @return $this |
||
| 77 | */ |
||
| 78 | public function setPath( $path ) |
||
| 84 | |||
| 85 | /** |
||
| 86 | * Gets finder |
||
| 87 | * @return Finder |
||
| 88 | */ |
||
| 89 | public function getFinder() |
||
| 93 | |||
| 94 | /** |
||
| 95 | * Sets finder |
||
| 96 | * @param Finder $finder |
||
| 97 | * @return $this |
||
| 98 | */ |
||
| 99 | public function setFinder( $finder ) |
||
| 105 | } |
||
| 106 |