Add service providers file for logging stuff

This commit is contained in:
Corey McKrill 2023-10-09 19:51:37 -07:00
parent 025677bfac
commit b7d72265d4
No known key found for this signature in database
GPG Key ID: 84BBFE669C4D97B8
2 changed files with 47 additions and 0 deletions

View File

@ -10,6 +10,7 @@ use Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\COTMig
use Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\DownloadPermissionsAdjusterServiceProvider;
use Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\AssignDefaultCategoryServiceProvider;
use Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\FeaturesServiceProvider;
use Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\LoggingServiceProvider;
use Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\MarketingServiceProvider;
use Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\MarketplaceServiceProvider;
use Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\OrdersControllersServiceProvider;
@ -71,6 +72,7 @@ final class Container {
MarketingServiceProvider::class,
MarketplaceServiceProvider::class,
BlockTemplatesServiceProvider::class,
LoggingServiceProvider::class,
);
/**

View File

@ -0,0 +1,45 @@
<?php
namespace Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders;
use Automattic\WooCommerce\Internal\Admin\Logging\PageController;
use Automattic\WooCommerce\Internal\Admin\Logging\FileV2\{ FileController, ListTable };
use Automattic\WooCommerce\Internal\DependencyManagement\AbstractServiceProvider;
/**
* LoggingServiceProvider class.
*/
class LoggingServiceProvider extends AbstractServiceProvider {
/**
* List services provided by this class.
*
* @var string[]
*/
protected $provides = array(
FileController::class,
ListTable::class,
PageController::class,
);
/**
* Registers services provided by this class.
*
* @return void
*/
public function register() {
$this->share( FileController::class );
$this->share( ListTable::class )->addArguments(
array(
FileController::class,
)
);
$this->share( PageController::class )->addArguments(
array(
FileController::class,
ListTable::class,
)
);
}
}