diff 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
line wrap: on
line diff
--- a/src/Replacer/Replacer.php	Tue Apr 22 21:37:44 2025 -0400
+++ b/src/Replacer/Replacer.php	Sun May 11 21:03:51 2025 -0400
@@ -114,6 +114,30 @@
         return 'Update'.$this->model_name($name).'Request';
     }
 
+
+    /**
+     * Generate the index view name.
+     */
+    public function index_view_name(string $name): string
+    {
+        return '';
+    }
+
+    /**
+     * Generate the create_edit view name.
+     */
+    public function create_edit_view_name(string $name): string
+    {
+        return '';
+    }
+
+    /**
+     * Generate the show view name.
+     */
+    public function show_view_name(string $name): string
+    {
+        return '';
+    }
     // Namespace Methods
     // These methods handle the formation of various namespaces used within the replacements.
 
@@ -174,6 +198,39 @@
     }
 
     /**
+     * Get the view namespace.
+     */
+    public function getViewNamespace(string $name): string
+    {
+        return $this->viewPath($name) . '\\';
+    }
+
+    /**
+     * Get the index view namespace.
+     */
+    public function getIndexViewNamespace(string $name): string
+    {
+        return $this->getViewNamespace($name) . '\\';
+    }
+
+    /**
+     * Get the create_edit view namespace.
+     */
+    public function getCreateEditViewNamespace(string $name): string
+    {
+        return $this->getViewNamespace($name) . '\\';
+    }
+
+    /**
+     * Get the show view namespace.
+     */
+    public function getShowViewNamespace(string $name): string
+    {
+        return $this->getViewNamespace($name) . '\\';
+    }
+
+
+    /**
      * Get the request uses string for replacement.
      */
     public function getRequestUses(string $name): string