Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders
UtilsClassesServiceProvider{}
Service provider for the non-static utils classes in the Automattic\WooCommerce\src namespace.
Хуков нет.
Использование
$UtilsClassesServiceProvider = new UtilsClassesServiceProvider(); // use class methods
Методы
- public register()
Код UtilsClassesServiceProvider{} UtilsClassesServiceProvider{} WC 9.3.1
class UtilsClassesServiceProvider extends AbstractInterfaceServiceProvider { /** * The classes/interfaces that are serviced by this service provider. * * @var array */ protected $provides = array( DatabaseUtil::class, HtmlSanitizer::class, OrderUtil::class, PluginUtil::class, COTMigrationUtil::class, WebhookUtil::class, RestApiUtil::class, TimeUtil::class, PluginInstaller::class, LegacyRestApiStub::class, ); /** * Register the classes. */ public function register() { $this->share( DatabaseUtil::class ); $this->share( HtmlSanitizer::class ); $this->share( OrderUtil::class ); $this->share( PluginUtil::class ) ->addArgument( LegacyProxy::class ); $this->share( COTMigrationUtil::class ) ->addArguments( array( CustomOrdersTableController::class, DataSynchronizer::class ) ); $this->share( WebhookUtil::class ); $this->share( RestApiUtil::class ); $this->share( TimeUtil::class ); $this->share_with_implements_tags( PluginInstaller::class ); $this->share_with_implements_tags( LegacyRestApiStub::class )->addArgument( RestApiUtil::class ); } }