fix(structure): Correct case-sensitivity for Linux compatibility
Rename folders to match PHP PSR-4 autoloading conventions: - schemas → Schemas - shared → Shared - Wordpress → WordPress (in all locations) Fixes deployment issues on Linux servers where filesystem is case-sensitive. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
55
Shared/Domain/Contracts/RendererInterface.php
Normal file
55
Shared/Domain/Contracts/RendererInterface.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ROITheme\Shared\Domain\Contracts;
|
||||
|
||||
use ROITheme\Shared\Domain\Entities\Component;
|
||||
|
||||
/**
|
||||
* RendererInterface - Contrato para renderizadores de componentes
|
||||
*
|
||||
* RESPONSABILIDAD: Definir el contrato que deben cumplir todos los renderizadores
|
||||
* de componentes para generar HTML a partir de los datos del componente.
|
||||
*
|
||||
* PRINCIPIOS:
|
||||
* - Interface Segregation: Una sola responsabilidad - renderizar HTML
|
||||
* - Dependency Inversion: Depender de abstracción, no de implementación
|
||||
*
|
||||
* USO:
|
||||
* ```php
|
||||
* final class MyRenderer implements RendererInterface
|
||||
* {
|
||||
* public function render(Component $component): string
|
||||
* {
|
||||
* $data = $component->getData();
|
||||
* // Generar HTML
|
||||
* return $html;
|
||||
* }
|
||||
*
|
||||
* public function supports(string $componentType): bool
|
||||
* {
|
||||
* return $componentType === 'my-component';
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @package ROITheme\Domain\Component
|
||||
*/
|
||||
interface RendererInterface
|
||||
{
|
||||
/**
|
||||
* Renderizar un componente a HTML
|
||||
*
|
||||
* @param Component $component Componente a renderizar
|
||||
* @return string HTML generado
|
||||
*/
|
||||
public function render(Component $component): string;
|
||||
|
||||
/**
|
||||
* Verificar si este renderizador soporta un tipo de componente
|
||||
*
|
||||
* @param string $componentType Tipo de componente (ej: 'navbar', 'footer')
|
||||
* @return bool True si soporta el tipo, false en caso contrario
|
||||
*/
|
||||
public function supports(string $componentType): bool;
|
||||
}
|
||||
Reference in New Issue
Block a user