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>
48 lines
1008 B
PHP
48 lines
1008 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace ROITheme\Shared\Application\UseCases\GetComponent;
|
|
|
|
/**
|
|
* GetComponentRequest - DTO de entrada para obtener componente
|
|
*
|
|
* RESPONSABILIDAD: Encapsular el nombre del componente a obtener
|
|
*
|
|
* USO:
|
|
* ```php
|
|
* $request = new GetComponentRequest('top_bar');
|
|
* ```
|
|
*
|
|
* @package ROITheme\Shared\Application\UseCases\GetComponent
|
|
*/
|
|
final readonly class GetComponentRequest
|
|
{
|
|
/**
|
|
* @param string $componentName Nombre del componente a obtener
|
|
*/
|
|
public function __construct(
|
|
private string $componentName
|
|
) {}
|
|
|
|
/**
|
|
* Obtener nombre del componente
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getComponentName(): string
|
|
{
|
|
return $this->componentName;
|
|
}
|
|
|
|
/**
|
|
* Factory method: Crear desde string
|
|
*
|
|
* @param string $componentName
|
|
* @return self
|
|
*/
|
|
public static function fromString(string $componentName): self
|
|
{
|
|
return new self($componentName);
|
|
}
|
|
}
|