1 | <?php |
||
19 | abstract class SingularRelation extends AbstractRelation |
||
20 | { |
||
21 | /** |
||
22 | * Create placeholder model when relation is empty. |
||
23 | */ |
||
24 | const CREATE_PLACEHOLDER = false; |
||
25 | |||
26 | /** |
||
27 | * @var RecordInterface |
||
28 | */ |
||
29 | protected $instance; |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function hasRelated(): bool |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | * |
||
47 | * Returns associated parent or NULL if none associated. |
||
48 | */ |
||
49 | public function getRelated() |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | * |
||
89 | * @throws SelectorException |
||
90 | * @throws QueryException |
||
91 | */ |
||
92 | protected function loadData() |
||
111 | |||
112 | /** |
||
113 | * Where statement to load outer record. |
||
114 | * |
||
115 | * @return array |
||
116 | */ |
||
117 | protected function whereStatement(): array |
||
123 | } |