CommonClassesStrategy.php
6 months ago
CommonPsr17ClassesStrategy.php
6 months ago
DiscoveryStrategy.php
3 years ago
MockClientStrategy.php
3 years ago
PuliBetaStrategy.php
3 years ago
DiscoveryStrategy.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaHttp\Discovery\Strategy; |
| 4 | |
| 5 | use AmeliaHttp\Discovery\Exception\StrategyUnavailableException; |
| 6 | |
| 7 | /** |
| 8 | * @author Tobias Nyholm <tobias.nyholm@gmail.com> |
| 9 | */ |
| 10 | interface DiscoveryStrategy |
| 11 | { |
| 12 | /** |
| 13 | * Find a resource of a specific type. |
| 14 | * |
| 15 | * @param string $type |
| 16 | * |
| 17 | * @return array The return value is always an array with zero or more elements. Each |
| 18 | * element is an array with two keys ['class' => string, 'condition' => mixed]. |
| 19 | * |
| 20 | * @throws StrategyUnavailableException if we cannot use this strategy. |
| 21 | */ |
| 22 | public static function getCandidates($type); |
| 23 | } |
| 24 |