| 1 | <?php |
||
| 8 | class StorageLocator |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var StorageProviderInterface[] |
||
| 12 | */ |
||
| 13 | private $providers = array(); |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var \SplObjectStorage |
||
| 17 | */ |
||
| 18 | private $storageCache; |
||
| 19 | |||
| 20 | 1 | public function __construct() |
|
| 24 | |||
| 25 | 1 | public function register($idProvider, StorageProviderInterface $provider) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return StorageProviderInterface |
||
| 32 | */ |
||
| 33 | 1 | public function get($idProvider) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @return StorageSelection |
||
| 44 | */ |
||
| 45 | 1 | public function selectStorage($idProvider, $id) |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @return StorageInterface |
||
| 56 | */ |
||
| 57 | 1 | public function getStorage(StorageSelection $selection) |
|
| 68 | } |
||
| 69 |