chore: complete update

This commit is contained in:
2025-07-17 16:24:20 +02:00
parent 899227b0a4
commit 64a7051137
1300 changed files with 85570 additions and 2756 deletions

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace App\Framework\Meta;
final class Keywords
{
private function __construct(
public array $keywords,
) {}
public static function fromStrings(string ...$keywords): self
{
return new self($keywords);
}
}

View File

@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace App\Framework\Meta;
final readonly class MetaData
{
public function __construct(
public string $title,
public string $description = '',
public OpenGraph $openGraph = new OpenGraphTypeWebsite,
) {}
}

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Framework\Meta;
interface MetaResolver
{
public function __invoke(): MetaData;
}

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Framework\Meta;
interface OpenGraph
{
public OpenGraphType $type {get;}
}

View File

@@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
namespace App\Framework\Meta;
enum OpenGraphType:string
{
case WEBSITE = 'website';
case ARTICLE = 'article';
}

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace App\Framework\Meta;
final class OpenGraphTypeWebsite implements OpenGraph
{
public OpenGraphType $type = OpenGraphType::WEBSITE;
}

View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace App\Framework\Meta;
final class StaticPageMetaResolver implements MetaResolver
{
public function __construct(
public string $title,
public string $description,
#public Keywords $keywords,
) {}
public function __invoke(): MetaData
{
return new MetaData(
$this->title,
$this->description,
#$this->keywords,
new OpenGraphTypeWebsite
);
}
}