mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Add isolated container and dhii modularity deps
This commit is contained in:
parent
c31637fc44
commit
818dbcf107
123 changed files with 3227 additions and 188 deletions
41
lib/packages/Interop/Container/ServiceProviderInterface.php
Normal file
41
lib/packages/Interop/Container/ServiceProviderInterface.php
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace WooCommerce\PayPalCommerce\Vendor\Interop\Container;
|
||||
|
||||
/**
|
||||
* A service provider provides entries to a container.
|
||||
*/
|
||||
interface ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Returns a list of all container entries registered by this service provider.
|
||||
*
|
||||
* - the key is the entry name
|
||||
* - the value is a callable that will return the entry, aka the **factory**
|
||||
*
|
||||
* Factories have the following signature:
|
||||
* function(\WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface $container)
|
||||
*
|
||||
* @return callable[]
|
||||
*/
|
||||
public function getFactories();
|
||||
|
||||
/**
|
||||
* Returns a list of all container entries extended by this service provider.
|
||||
*
|
||||
* - the key is the entry name
|
||||
* - the value is a callable that will return the modified entry
|
||||
*
|
||||
* Callables have the following signature:
|
||||
* function(WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface $container, $previous)
|
||||
* or function(WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface $container, $previous = null)
|
||||
*
|
||||
* About factories parameters:
|
||||
*
|
||||
* - the container (instance of `WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface`)
|
||||
* - the entry to be extended. If the entry to be extended does not exist and the parameter is nullable, `null` will be passed.
|
||||
*
|
||||
* @return callable[]
|
||||
*/
|
||||
public function getExtensions();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue