AbstractServiceProvider.php
5 years ago
BootableServiceProviderInterface.php
5 years ago
ServiceProviderAggregate.php
3 years ago
ServiceProviderAggregateInterface.php
5 years ago
ServiceProviderInterface.php
5 years ago
ServiceProviderInterface.php
47 lines
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Automattic\WooCommerce\Vendor\League\Container\ServiceProvider; |
| 4 | |
| 5 | use Automattic\WooCommerce\Vendor\League\Container\ContainerAwareInterface; |
| 6 | |
| 7 | interface ServiceProviderInterface extends ContainerAwareInterface |
| 8 | { |
| 9 | /** |
| 10 | * Returns a boolean if checking whether this provider provides a specific |
| 11 | * service or returns an array of provided services if no argument passed. |
| 12 | * |
| 13 | * @param string $service |
| 14 | * |
| 15 | * @return boolean |
| 16 | */ |
| 17 | public function provides(string $service) : bool; |
| 18 | |
| 19 | /** |
| 20 | * Use the register method to register items with the container via the |
| 21 | * protected $this->leagueContainer property or the `getLeagueContainer` method |
| 22 | * from the ContainerAwareTrait. |
| 23 | * |
| 24 | * @return void |
| 25 | */ |
| 26 | public function register(); |
| 27 | |
| 28 | /** |
| 29 | * Set a custom id for the service provider. This enables |
| 30 | * registering the same service provider multiple times. |
| 31 | * |
| 32 | * @param string $id |
| 33 | * |
| 34 | * @return self |
| 35 | */ |
| 36 | public function setIdentifier(string $id) : ServiceProviderInterface; |
| 37 | |
| 38 | /** |
| 39 | * The id of the service provider uniquely identifies it, so |
| 40 | * that we can quickly determine if it has already been registered. |
| 41 | * Defaults to get_class($provider). |
| 42 | * |
| 43 | * @return string |
| 44 | */ |
| 45 | public function getIdentifier() : string; |
| 46 | } |
| 47 |