wip: booking process

This commit is contained in:
Björn Fromme committed 2025-07-14 17:15:15 +02:00
1 parent a55e30e12d
commit bef18971c3
45 files changed
+688 -270

No files matched your search

+20
View File
@@ -1,18 +1,38 @@
<?php
declare(strict_types=1);
namespace App\BusProNet\Model;
/**
* Represents base data with item collection and retrieval functionality.
*
* This class provides a container for generic data items with methods
* to access the entire collection or individual items by key.
*/
class BaseData
{
public function __construct(private readonly array $items)
{
}
/**
* Retrieves all items in the base data collection.
*
* @return array The complete items array
*/
public function getItems(): array
{
return $this->items;
}
/**
* Retrieves a specific item by its key.
*
* @param string $key The key to search for
*
* @return mixed The item value or null if not found
*/
public function getItemByKey(string $key): mixed
{
return $this->items[$key] ?? null;