| 1 |
<?php |
| 2 |
/** |
| 3 |
* Register Storage related definitions in the container. |
| 4 |
* |
| 5 |
* @package SolidWP\Performance |
| 6 |
*/ |
| 7 |
|
| 8 |
declare( strict_types=1 ); |
| 9 |
|
| 10 |
namespace SolidWP\Performance\Storage; |
| 11 |
|
| 12 |
use SolidWP\Performance\Contracts\Service_Provider; |
| 13 |
use SolidWP\Performance\Storage\Contracts\Storage; |
| 14 |
use SolidWP\Performance\Storage\Drivers\Option_Storage; |
| 15 |
|
| 16 |
/** |
| 17 |
* Register Storage related definitions in the container. |
| 18 |
* |
| 19 |
* @package SolidWP\Performance |
| 20 |
*/ |
| 21 |
final class Provider extends Service_Provider { |
| 22 |
|
| 23 |
/** |
| 24 |
* @inheritDoc |
| 25 |
*/ |
| 26 |
public function register(): void { |
| 27 |
$this->container->singleton( Storage::class, fn(): Storage => $this->container->get( Option_Storage::class ) ); |
| 28 |
} |
| 29 |
} |
| 30 |
|