1 | <?php declare(strict_types=1); |
||
33 | class RelationshipDataIsResource extends BaseRelationshipData implements RelationshipDataInterface |
||
34 | { |
||
35 | /** @var string */ |
||
36 | public const MSG_INVALID_OPERATION = 'Invalid operation.'; |
||
37 | |||
38 | /** |
||
39 | * @var mixed |
||
40 | */ |
||
41 | private $resource; |
||
42 | |||
43 | /** |
||
44 | * @var null|ResourceInterface |
||
45 | */ |
||
46 | private $parsedResource = null; |
||
47 | |||
48 | /** |
||
49 | * @param FactoryInterface $factory |
||
50 | * @param SchemaContainerInterface $schemaContainer |
||
51 | * @param PositionInterface $position |
||
52 | * @param mixed $resource |
||
53 | */ |
||
54 | 24 | public function __construct( |
|
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | 1 | public function isCollection(): bool |
|
69 | { |
||
70 | 1 | return false; |
|
71 | } |
||
72 | |||
73 | /** |
||
74 | * @inheritdoc |
||
75 | */ |
||
76 | 1 | public function isNull(): bool |
|
77 | { |
||
78 | 1 | return false; |
|
79 | } |
||
80 | |||
81 | /** |
||
82 | * @inheritdoc |
||
83 | */ |
||
84 | 23 | public function isResource(): bool |
|
88 | |||
89 | /** |
||
90 | * @inheritdoc |
||
91 | */ |
||
92 | 1 | public function isIdentifier(): bool |
|
93 | { |
||
94 | 1 | return false; |
|
95 | } |
||
96 | |||
97 | /** |
||
98 | * @inheritdoc |
||
99 | */ |
||
100 | 1 | public function getIdentifier(): IdentifierInterface |
|
101 | { |
||
102 | 1 | throw new LogicException(_(static::MSG_INVALID_OPERATION)); |
|
103 | } |
||
104 | |||
105 | /** |
||
106 | * @inheritdoc |
||
107 | */ |
||
108 | 1 | public function getIdentifiers(): iterable |
|
109 | { |
||
110 | 1 | throw new LogicException(_(static::MSG_INVALID_OPERATION)); |
|
111 | } |
||
112 | |||
113 | /** |
||
114 | * @inheritdoc |
||
115 | */ |
||
116 | 22 | public function getResource(): ResourceInterface |
|
124 | |||
125 | /** |
||
126 | * @inheritdoc |
||
127 | */ |
||
128 | 1 | public function getResources(): iterable |
|
129 | { |
||
132 | } |
||
133 |