HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/kadence-blocks/includes/resources/Optimizer/Store/Provider.php
<?php declare( strict_types=1 );

namespace KadenceWP\KadenceBlocks\Optimizer\Store;

use KadenceWP\KadenceBlocks\Optimizer\Store\Cached_Store_Decorator;
use KadenceWP\KadenceBlocks\Optimizer\Store\Contracts\Store;
use KadenceWP\KadenceBlocks\Optimizer\Store\Excluded_Store_Decorator;
use KadenceWP\KadenceBlocks\Optimizer\Store\Expired_Store_Decorator;
use KadenceWP\KadenceBlocks\Optimizer\Store\Status_Sync_Store_Decorator;
use KadenceWP\KadenceBlocks\Optimizer\Store\Table_Store;
use KadenceWP\KadenceBlocks\StellarWP\ProphecyMonorepo\Container\Contracts\Provider as Provider_Contract;

final class Provider extends Provider_Contract {

	public function register(): void {
		// Decorator chain (bottom-up execution, each wraps the one below):
		// When calling Store methods, execution flows TOP to BOTTOM through decorators.
		//
		// Reads (get): Expired → Cache → Excluded → Status_Sync → Table
		// Writes (set): Expired → Cache → Excluded (blocks excluded) → Status_Sync (pure) → Table
		//
		// Critical ordering:
		// 1. Expired MUST be outermost to filter stale data even from cache.
		// 2. Excluded MUST be before Status_Sync so sync logic stays pure.
		$this->container->bindDecorators(
			Store::class,
			[
				Expired_Store_Decorator::class,
				Cached_Store_Decorator::class,
				Excluded_Store_Decorator::class,
				Status_Sync_Store_Decorator::class,
				Table_Store::class,
			]
		);
	}
}