🎉 initial commit

This commit is contained in:
2024-10-07 22:58:27 +02:00
commit d3eccf99f0
824 changed files with 16401 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
namespace Application\Models;
use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\Type;
class Article
{
use Meta;
#[SerializedName('authors')]
#[Type('array<' . Author::class . '>')]
protected array $authors;
#[SerializedName('headline')]
#[Type('string')]
protected string $headline;
#[SerializedName('excerpt')]
#[Type('string')]
protected string $excerpt;
#[SerializedName('image')]
#[Type(Image::class)]
protected Image $image;
#[SerializedName('text')]
#[Type('string')]
protected string $text;
/**
* Return the title / headline.
*
* @return string
*/
public function getTitle(): string {
return $this->headline;
}
/**
* Return the text / article body text.
*
* @return string
*/
public function getText(): string {
return $this->text;
}
}

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Application\Models;
use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\Type;
class Author
{
use Meta;
#[SerializedName('name')]
#[Type('string')]
private string $name;
}

View File

@@ -0,0 +1,65 @@
<?php
declare(strict_types=1);
namespace Application\Models;
use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\Type;
class Image
{
use Meta;
#[SerializedName('path')]
#[Type('string')]
private string $path;
#[SerializedName('title')]
#[Type('string')]
private string $title;
#[SerializedName('mime')]
#[Type('string')]
private string $mime;
#[SerializedName('type')]
#[Type('string')]
private string $type;
#[SerializedName('description')]
#[Type('string')]
private string $description;
#[SerializedName('tags')]
#[Type('array')]
private array $tags;
#[SerializedName('size')]
#[Type('string')]
private string $size;
#[SerializedName('colors')]
#[Type('array')]
private array $colors;
#[SerializedName('width')]
#[Type('string')]
private string $width;
#[SerializedName('height')]
#[Type('string')]
private string $height;
#[SerializedName('altText')]
#[Type('string')]
private string $altText;
#[SerializedName('thumbhash')]
#[Type('string')]
private string $thumbhash;
#[SerializedName('folder')]
#[Type('string')]
private string $folder;
}

View File

@@ -0,0 +1,38 @@
<?php
namespace Application\Models;
use DateTime;
use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\Type;
trait Meta
{
#[SerializedName('_model')]
#[Type('string')]
private ?string $metaModel;
#[SerializedName('_state')]
#[Type('int')]
private ?int $metaState;
#[SerializedName('_modified')]
#[Type('DateTime<"U">')]
private ?DateTime $metaModified;
#[SerializedName('_mby')]
#[Type('string')]
private ?string $metaMby;
#[SerializedName('_created')]
#[Type('DateTime<"U">')]
private ?DateTime $metaCreated;
#[SerializedName('_cby')]
#[Type('string')]
private ?string $metaCby;
#[SerializedName('_id')]
#[Type('string')]
private ?string $metaId;
}

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Application\Models;
use JMS\Serializer\Annotation\SerializedName;
use JMS\Serializer\Annotation\Type;
class Site
{
use Meta;
#[SerializedName('title')]
#[Type('string')]
private ?string $title;
public function getSiteTitle(): string
{
return $this->title;
}
}