comparison src/Replacer/Replacer.php @ 25:1a717c7b211f codex

added support for some basic views
author Luka Sitas <sitas.luka.97@gmail.com>
date Sun, 11 May 2025 21:03:51 -0400
parents 827efbf4d73c
children b17f81b804ff
comparison
equal deleted inserted replaced
24:31109c61ce02 25:1a717c7b211f
112 public function update_request_name(string $name): string 112 public function update_request_name(string $name): string
113 { 113 {
114 return 'Update'.$this->model_name($name).'Request'; 114 return 'Update'.$this->model_name($name).'Request';
115 } 115 }
116 116
117
118 /**
119 * Generate the index view name.
120 */
121 public function index_view_name(string $name): string
122 {
123 return '';
124 }
125
126 /**
127 * Generate the create_edit view name.
128 */
129 public function create_edit_view_name(string $name): string
130 {
131 return '';
132 }
133
134 /**
135 * Generate the show view name.
136 */
137 public function show_view_name(string $name): string
138 {
139 return '';
140 }
117 // Namespace Methods 141 // Namespace Methods
118 // These methods handle the formation of various namespaces used within the replacements. 142 // These methods handle the formation of various namespaces used within the replacements.
119 143
120 /** 144 /**
121 * Get the root namespace for the application. 145 * Get the root namespace for the application.
170 */ 194 */
171 public function getUpdateRequestNamespace(string $name): string 195 public function getUpdateRequestNamespace(string $name): string
172 { 196 {
173 return $this->getRequestNamespace($name); 197 return $this->getRequestNamespace($name);
174 } 198 }
199
200 /**
201 * Get the view namespace.
202 */
203 public function getViewNamespace(string $name): string
204 {
205 return $this->viewPath($name) . '\\';
206 }
207
208 /**
209 * Get the index view namespace.
210 */
211 public function getIndexViewNamespace(string $name): string
212 {
213 return $this->getViewNamespace($name) . '\\';
214 }
215
216 /**
217 * Get the create_edit view namespace.
218 */
219 public function getCreateEditViewNamespace(string $name): string
220 {
221 return $this->getViewNamespace($name) . '\\';
222 }
223
224 /**
225 * Get the show view namespace.
226 */
227 public function getShowViewNamespace(string $name): string
228 {
229 return $this->getViewNamespace($name) . '\\';
230 }
231
175 232
176 /** 233 /**
177 * Get the request uses string for replacement. 234 * Get the request uses string for replacement.
178 */ 235 */
179 public function getRequestUses(string $name): string 236 public function getRequestUses(string $name): string