┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘
prd-web-01.centraldc.gr
LOCATION:
/var/www/html/sustainablepeach/wp-content/plugins/wp-rollback/src/Core
☗ ROOT
↻ REFRESH
✎ EDIT FILE
EDITING: ServiceProvider.php
<?php /** * Service Provider * * @package WpRollback\Free\Core */ declare(strict_types=1); namespace WpRollback\Free\Core; use WpRollback\SharedCore\Core\DebugMode; use WpRollback\SharedCore\Core\Cache; use WpRollback\SharedCore\Core\Exceptions\BindingResolutionException; use WpRollback\SharedCore\Core\Contracts\ServiceProvider as ServiceProviderContract; use WpRollback\Free\Core\Constants; use WpRollback\Free\Core\Request; use WpRollback\SharedCore\Core\SharedCore; use WpRollback\SharedCore\Core\BaseConstants; use WpRollback\Free\PluginSetup\PluginScripts; /** * Class ServiceProvider * * @package WpRollback\Free\Core */ class ServiceProvider implements ServiceProviderContract { /** * This function registers the service provider. * * @throws BindingResolutionException */ public function register(): void { // Create a single instance of Constants $constants = new Constants(); // Bind both BaseConstants and Constants to the same instance SharedCore::container()->singleton(BaseConstants::class, function () use ($constants) { return $constants; }); SharedCore::container()->singleton(Constants::class, function () use ($constants) { return $constants; }); // Register plugin-specific Request implementation SharedCore::container()->singleton(Request::class, function () use ($constants) { return new Request($constants); }); // Register plugin-specific Cache implementation SharedCore::container()->singleton(Cache::class, function () use ($constants) { return new Cache($constants->getSlug()); }); // Register plugin-specific DebugMode if needed SharedCore::container()->singleton(DebugMode::class, function () { return DebugMode::makeWithWpDebugConstant(); }); // Register PluginScripts SharedCore::container()->singleton(PluginScripts::class); } /** * This function boots the service provider. * */ public function boot(): void { } }
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 Constants.php
PHP
625 B
2026-05-21 07:53
EDIT
📄 Request.php
PHP
1.3 KB
2026-05-21 07:53
EDIT
📄 ServiceProvider.php
PHP
2.1 KB
2026-05-21 07:53
EDIT