DB Entity: Inheriting/Extending

This commit is contained in:
Roman Hergenreder
2022-11-27 12:33:27 +01:00
parent 3b2b5984d6
commit 26a22f5299
20 changed files with 308 additions and 157 deletions

View File

@@ -0,0 +1,18 @@
<?php
namespace Core\Objects\DatabaseEntity\Attribute;
#[\Attribute(\Attribute::TARGET_PROPERTY)]
class ExtendingEnum extends EnumArr {
private array $mappings;
public function __construct(array $values) {
parent::__construct(array_keys($values));
$this->mappings = $values;
}
public function getMappings(): array {
return $this->mappings;
}
}