1 | <?php |
||
14 | class ActionNameGenerator extends AbstractModelNameGenerator { |
||
15 | |||
16 | // |
||
17 | // Model generators |
||
18 | // |
||
19 | |||
20 | /** |
||
21 | * Generates the name for a list action |
||
22 | * |
||
23 | * @param Table $model |
||
24 | * @return string |
||
25 | */ |
||
26 | public function generateModelPaginate(Table $model) { |
||
29 | |||
30 | /** |
||
31 | * Generates the name for a create action |
||
32 | * |
||
33 | * @param Table $model |
||
34 | * @return string |
||
35 | */ |
||
36 | public function generateModelCreate(Table $model) { |
||
39 | |||
40 | /** |
||
41 | * Generates the name for a read action |
||
42 | * |
||
43 | * @param Table $model |
||
44 | * @return string |
||
45 | */ |
||
46 | public function generateModelRead(Table $model) { |
||
49 | |||
50 | /** |
||
51 | * Generates the name for an update action |
||
52 | * |
||
53 | * @param Table $model |
||
54 | * @return string |
||
55 | */ |
||
56 | public function generateModelUpdate(Table $model) { |
||
59 | |||
60 | /** |
||
61 | * Generates the name for a delete action |
||
62 | * |
||
63 | * @param Table $model |
||
64 | * @return string |
||
65 | */ |
||
66 | public function generateModelDelete(Table $model) { |
||
69 | |||
70 | // |
||
71 | // Relationship generators |
||
72 | // |
||
73 | |||
74 | /** |
||
75 | * Generates the name for a relationship read action |
||
76 | * |
||
77 | * @param Relationship $relationship |
||
78 | * @return string |
||
79 | */ |
||
80 | public function generateRelationshipRead(Relationship $relationship) { |
||
86 | |||
87 | /** |
||
88 | * Generates the name for a relationship update action |
||
89 | * |
||
90 | * @param Relationship $relationship |
||
91 | * @return string |
||
92 | */ |
||
93 | public function generateRelationshipUpdate(Relationship $relationship) { |
||
99 | |||
100 | /** |
||
101 | * Generates the name for a relationship add action |
||
102 | * |
||
103 | * @param Relationship $relationship |
||
104 | * @return string |
||
105 | */ |
||
106 | public function generateRelationshipAdd(Relationship $relationship) { |
||
112 | |||
113 | /** |
||
114 | * Generates the name for a relationship remove action |
||
115 | * |
||
116 | * @param Relationship $relationship |
||
117 | * @return string |
||
118 | */ |
||
119 | public function generateRelationshipRemove(Relationship $relationship) { |
||
125 | |||
126 | public function parseName($actionName) { |
||
133 | |||
134 | public function parseModel($actionName) { |
||
140 | |||
141 | public function parseRelationship($actionName) { |
||
152 | } |