feat(exclusions): Implement component exclusion system (Plan 99.11)
Adds ability to exclude components from specific: - Categories (by slug or term_id) - Post/Page IDs - URL patterns (substring or regex) Architecture: - Domain: Value Objects (CategoryExclusion, PostIdExclusion, UrlPatternExclusion, ExclusionRuleSet) + Contracts - Application: EvaluateExclusionsUseCase + EvaluateComponentVisibilityUseCase (orchestrator) - Infrastructure: WordPressExclusionRepository, WordPressPageContextProvider, WordPressServerRequestProvider - Admin: ExclusionFormPartial (reusable UI), ExclusionFieldProcessor, JS toggle The PageVisibilityHelper now uses the orchestrator UseCase that combines page-type visibility (Plan 99.10) with exclusion rules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
27
Shared/Domain/Contracts/ServerRequestProviderInterface.php
Normal file
27
Shared/Domain/Contracts/ServerRequestProviderInterface.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ROITheme\Shared\Domain\Contracts;
|
||||
|
||||
/**
|
||||
* Contrato para obtener datos del request HTTP
|
||||
*
|
||||
* Encapsula el acceso a $_SERVER para:
|
||||
* - Evitar acceso directo a superglobales en Infrastructure
|
||||
* - Permitir testear sin dependencia de $_SERVER
|
||||
*
|
||||
* v1.1: Nuevo - encapsular acceso a $_SERVER
|
||||
*
|
||||
* Metodos: 1 (cumple ISP < 5 metodos)
|
||||
*
|
||||
* @package ROITheme\Shared\Domain\Contracts
|
||||
*/
|
||||
interface ServerRequestProviderInterface
|
||||
{
|
||||
/**
|
||||
* Obtiene el Request URI actual
|
||||
*
|
||||
* @return string URI del request (ej: "/blog/mi-post/")
|
||||
*/
|
||||
public function getRequestUri(): string;
|
||||
}
|
||||
Reference in New Issue
Block a user