Each handler now declares the data class it needs via dataClass(). The controller builds the appropriate typed DTO from the raw request array before calling handle(), giving handlers typed property access instead of raw array lookups. Handlers moved to App\Services\Micropub\Handlers, data objects to App\Services\Micropub\Data. MicropubHandlerRegistry and the interface are documented with flow diagrams and guidance for adding new types. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 lines
220 B
PHP
12 lines
220 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\Micropub\Data;
|
|
|
|
abstract class MicropubData
|
|
{
|
|
abstract public static function fromArray(array $data): static;
|
|
|
|
abstract public function toArray(): array;
|
|
}
|