2022-11-20 17:13:53 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Core\Objects\DatabaseEntity\Attribute;
|
|
|
|
|
2023-01-11 13:30:08 +01:00
|
|
|
// Unmanaged NM table, e.g. #[Multiple(Group::class)] for property 'groups' in User::class will create a
|
|
|
|
// table called NM_User_groups with just two columns (user_id, group_id)
|
|
|
|
|
2022-11-20 17:13:53 +01:00
|
|
|
#[\Attribute(\Attribute::TARGET_PROPERTY)]
|
|
|
|
class Multiple {
|
|
|
|
|
|
|
|
private string $className;
|
|
|
|
|
|
|
|
public function __construct(string $className) {
|
|
|
|
$this->className = $className;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getClassName(): string {
|
|
|
|
return $this->className;
|
|
|
|
}
|
|
|
|
}
|