Add compatibility module

This commit is contained in:
Jorge A. Torres 2021-07-15 06:51:37 -05:00
parent bc5a84cdd2
commit 473463597a
4 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1,12 @@
<?php
/**
* The compatibility module extensions.
*
* @package WooCommerce\PayPalCommerce\Compat
*/
declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\Compat;
return array();

View file

@ -0,0 +1,16 @@
<?php
/**
* The compatibility module.
*
* @package WooCommerce\PayPalCommerce\Compat
*/
declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\Compat;
use Dhii\Modular\Module\ModuleInterface;
return static function (): ModuleInterface {
return new CompatModule();
};

View file

@ -0,0 +1,12 @@
<?php
/**
* The compatibility module services.
*
* @package WooCommerce\PayPalCommerce\Compat
*/
declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\Compat;
return array();

View file

@ -0,0 +1,49 @@
<?php
/**
* The compatibility module.
*
* @package WooCommerce\PayPalCommerce\Compat
*/
declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\Compat;
use Dhii\Container\ServiceProvider;
use Dhii\Modular\Module\ModuleInterface;
use Interop\Container\ServiceProviderInterface;
use Psr\Container\ContainerInterface;
/**
* Class CompatModule
*/
class CompatModule implements ModuleInterface {
/**
* Setup the compatibility module.
*
* @return ServiceProviderInterface
*/
public function setup(): ServiceProviderInterface {
return new ServiceProvider(
require __DIR__ . '/../services.php',
require __DIR__ . '/../extensions.php'
);
}
/**
* Run the compatibility module.
*
* @param ContainerInterface|null $container The Container.
*/
public function run( ContainerInterface $container ) {
}
/**
* Returns the key for the module.
*
* @return string|void
*/
public function getKey() {
}
}