| 1 |
<?php |
| 2 |
/** |
| 3 |
* Register memoization definitions in the container. |
| 4 |
* |
| 5 |
* @package SolidWP\Performance |
| 6 |
*/ |
| 7 |
|
| 8 |
declare( strict_types=1 ); |
| 9 |
|
| 10 |
namespace SolidWP\Performance\Memoize; |
| 11 |
|
| 12 |
use SolidWP\Performance\Contracts\Service_Provider; |
| 13 |
use SolidWP\Performance\StellarWP\Memoize\Contracts\DriverInterface; |
| 14 |
use SolidWP\Performance\StellarWP\Memoize\Contracts\MemoizerInterface; |
| 15 |
use SolidWP\Performance\StellarWP\Memoize\Drivers\MemoryDriver; |
| 16 |
use SolidWP\Performance\StellarWP\Memoize\Memoizer; |
| 17 |
|
| 18 |
/** |
| 19 |
* Register memoization definitions in the container. |
| 20 |
* |
| 21 |
* @link https://github.com/stellarwp/memoize |
| 22 |
* |
| 23 |
* @package SolidWP\Performance |
| 24 |
*/ |
| 25 |
final class Provider extends Service_Provider { |
| 26 |
|
| 27 |
/** |
| 28 |
* @inheritDoc |
| 29 |
*/ |
| 30 |
public function register(): void { |
| 31 |
$this->container->singleton( DriverInterface::class, MemoryDriver::class ); |
| 32 |
$this->container->bind( MemoizerInterface::class, Memoizer::class ); |
| 33 |
} |
| 34 |
} |
| 35 |
|