embedpress
/
vendor
/
wpdevelopers
/
embera
/
src
/
Embera
/
ProviderCollection
/
ProviderCollectionInterface.php
CustomProviderCollection.php
5 years ago
DefaultProviderCollection.php
5 years ago
ProviderCollectionAdapter.php
5 years ago
ProviderCollectionInterface.php
5 years ago
SlimProviderCollection.php
5 years ago
ProviderCollectionInterface.php
72 lines
| 1 | <?php |
| 2 | /** |
| 3 | * ProviderCollectionInterface.php |
| 4 | * |
| 5 | * @package Embera |
| 6 | * @author Michael Pratt <yo@michael-pratt.com> |
| 7 | * @link http://www.michael-pratt.com/ |
| 8 | * |
| 9 | * For the full copyright and license information, please view the LICENSE |
| 10 | * file that was distributed with this source code. |
| 11 | */ |
| 12 | |
| 13 | namespace Embera\ProviderCollection; |
| 14 | |
| 15 | /** |
| 16 | * Interface used by Providercollections |
| 17 | */ |
| 18 | interface ProviderCollectionInterface |
| 19 | { |
| 20 | /** |
| 21 | * Sets the configuration array for this object |
| 22 | * |
| 23 | * @param array $config Associative array with configuration options |
| 24 | * @return void |
| 25 | */ |
| 26 | public function setConfig(array $config = []); |
| 27 | |
| 28 | /** |
| 29 | * Adds a new Provider into the provider map |
| 30 | * |
| 31 | * @param string $host The host for the map |
| 32 | * @param string|object $class The class or object that should manage the provider |
| 33 | * @return void |
| 34 | */ |
| 35 | public function addProvider($host, $class); |
| 36 | |
| 37 | /** |
| 38 | * Filters a provider from the provider list based on the provider name and returns a new |
| 39 | * collection with the given results |
| 40 | * |
| 41 | * @param string|callable $providerName The name of the provider or a callable function |
| 42 | * @return object |
| 43 | */ |
| 44 | public function filter($providerName); |
| 45 | |
| 46 | /** |
| 47 | * Returns an array with providers found. |
| 48 | * |
| 49 | * @param array|string $data An array with urls or a string with urls |
| 50 | * @return array |
| 51 | */ |
| 52 | public function findProviders($data); |
| 53 | |
| 54 | /** |
| 55 | * Sets the providerList relationship |
| 56 | * |
| 57 | * @param array $list |
| 58 | * @return void |
| 59 | */ |
| 60 | public function setProviderList(array $list); |
| 61 | |
| 62 | |
| 63 | /** |
| 64 | * Registers a provider into the default |
| 65 | * |
| 66 | * @param mixed $names |
| 67 | * @param bool $prefix |
| 68 | * @return void |
| 69 | */ |
| 70 | public function registerProvider($names, $prefix = true); |
| 71 | } |
| 72 |