1 | <?php |
||
13 | class DirectForeignKeyMethodDescriptor implements MethodDescriptorInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var ForeignKeyConstraint |
||
17 | */ |
||
18 | private $fk; |
||
19 | |||
20 | private $useAlternateName = false; |
||
21 | /** |
||
22 | * @var Table |
||
23 | */ |
||
24 | private $mainTable; |
||
25 | |||
26 | /** |
||
27 | * @param ForeignKeyConstraint $fk The foreign key pointing to our bean. |
||
28 | * @param Table $mainTable The main table that is pointed to. |
||
29 | */ |
||
30 | public function __construct(ForeignKeyConstraint $fk, Table $mainTable) |
||
35 | |||
36 | /** |
||
37 | * Returns the name of the method to be generated. |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getName() : string |
||
55 | |||
56 | /** |
||
57 | * Requests the use of an alternative name for this method. |
||
58 | */ |
||
59 | public function useAlternativeName() |
||
63 | |||
64 | /** |
||
65 | * Returns the code of the method. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | public function getCode() : string |
||
99 | |||
100 | private function getFilters(ForeignKeyConstraint $fk) : string |
||
116 | |||
117 | /** |
||
118 | * Returns an array of classes that needs a "use" for this method. |
||
119 | * |
||
120 | * @return string[] |
||
121 | */ |
||
122 | public function getUsedClasses() : array |
||
126 | |||
127 | /** |
||
128 | * Returns the code to past in jsonSerialize. |
||
129 | * |
||
130 | * @return string |
||
131 | */ |
||
132 | public function getJsonSerializeCode() : string |
||
136 | } |
||
137 |