1 | <?php |
||
23 | abstract class AbstractRelation extends Base |
||
24 | { |
||
25 | /** |
||
26 | * @readwrite |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $propertyName; |
||
30 | |||
31 | /** |
||
32 | * @readwrite |
||
33 | * @var EntityDescriptorInterface |
||
34 | */ |
||
35 | protected $entityDescriptor; |
||
36 | |||
37 | /** |
||
38 | * Parent or related entity class name |
||
39 | * @readwrite |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $parentEntity; |
||
43 | |||
44 | /** |
||
45 | * @readwrite |
||
46 | * @var EntityDescriptorInterface |
||
47 | */ |
||
48 | protected $parentEntityDescriptor; |
||
49 | |||
50 | /** |
||
51 | * @readwrite |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $foreignKey; |
||
55 | |||
56 | /** |
||
57 | * Returns the property holding the relation |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getPropertyName() |
||
65 | |||
66 | |||
67 | /** |
||
68 | * Gets the entity descriptor |
||
69 | * |
||
70 | * @return EntityDescriptorInterface |
||
71 | */ |
||
72 | public function getEntityDescriptor() |
||
76 | |||
77 | /** |
||
78 | * Sets entity descriptor |
||
79 | * |
||
80 | * @param EntityDescriptorInterface $descriptor |
||
81 | * @return $this |
||
82 | */ |
||
83 | 12 | public function setEntityDescriptor(EntityDescriptorInterface $descriptor) |
|
88 | |||
89 | /** |
||
90 | * Gets parent entity class name |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getParentEntity() |
||
98 | |||
99 | /** |
||
100 | * Gets the parent or related entity descriptor |
||
101 | * |
||
102 | * @return EntityDescriptorInterface |
||
103 | */ |
||
104 | public function getParentEntityDescriptor() |
||
114 | |||
115 | /** |
||
116 | * Sets parent entity descriptor |
||
117 | * |
||
118 | * @param EntityDescriptorInterface $parentEntityDescriptor |
||
119 | * @return BelongsTo |
||
120 | */ |
||
121 | public function setParentEntityDescriptor( |
||
127 | |||
128 | /** |
||
129 | * Gets the foreign key field name |
||
130 | * |
||
131 | * @return string |
||
132 | */ |
||
133 | public function getForeignKey() |
||
142 | } |