39 lines
908 B
PHP
39 lines
908 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace KupShop\OrderingBundle\Entity\Invoicing;
|
|
|
|
readonly class InvoicingData implements \ArrayAccess
|
|
{
|
|
public function __construct(
|
|
public ?string $firmOwner,
|
|
public ?string $email,
|
|
public ?string $phone,
|
|
public ?string $ico,
|
|
public ?string $dic,
|
|
public ?string $address,
|
|
) {
|
|
}
|
|
|
|
public function offsetExists(mixed $offset): bool
|
|
{
|
|
return isset($this->{$offset});
|
|
}
|
|
|
|
public function offsetGet(mixed $offset): mixed
|
|
{
|
|
return $this->{$offset} ?? null;
|
|
}
|
|
|
|
public function offsetSet(mixed $offset, mixed $value): void
|
|
{
|
|
throw new \RuntimeException('Cannot set value to member of readonly class!');
|
|
}
|
|
|
|
public function offsetUnset(mixed $offset): void
|
|
{
|
|
throw new \RuntimeException('Cannot unset value to member of readonly class!');
|
|
}
|
|
}
|