| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace Salient\Core\Reflection; |
| 4: | |
| 5: | use Salient\Contract\Core\Entity\Relatable; |
| 6: | |
| 7: | /** |
| 8: | * @api |
| 9: | */ |
| 10: | final class PropertyRelationship |
| 11: | { |
| 12: | /** |
| 13: | * Property name |
| 14: | */ |
| 15: | public string $Name; |
| 16: | |
| 17: | /** |
| 18: | * Relationship type |
| 19: | * |
| 20: | * @var Relatable::* |
| 21: | */ |
| 22: | public int $Type; |
| 23: | |
| 24: | /** |
| 25: | * Target class |
| 26: | * |
| 27: | * @var class-string<Relatable> |
| 28: | */ |
| 29: | public string $Target; |
| 30: | |
| 31: | /** |
| 32: | * @internal |
| 33: | * |
| 34: | * @param Relatable::* $type |
| 35: | * @param class-string<Relatable> $target |
| 36: | */ |
| 37: | public function __construct(string $name, int $type, string $target) |
| 38: | { |
| 39: | $this->Name = $name; |
| 40: | $this->Type = $type; |
| 41: | $this->Target = $target; |
| 42: | } |
| 43: | } |
| 44: |