| Total Complexity | 7 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class CbStructure |
||
| 6 | { |
||
| 7 | public static function componentsPath(string $type = ''): string |
||
| 8 | { |
||
| 9 | $componentPath = implode(DIRECTORY_SEPARATOR, ['vendor', 'crocodicstudio', 'crudbooster', 'src', 'views', 'form', 'type_components', $type]); |
||
| 10 | |||
| 11 | return base_path($componentPath); |
||
| 12 | } |
||
| 13 | |||
| 14 | public static function publishedComponentsPath(string $type = ''): string |
||
| 15 | { |
||
| 16 | $Path = implode(DIRECTORY_SEPARATOR, ['views', 'vendor', 'crudbooster', 'type_components', $type]); |
||
| 17 | |||
| 18 | return resource_path($Path); |
||
| 19 | } |
||
| 20 | |||
| 21 | public static function controllerPath(string $controller): string |
||
| 22 | { |
||
| 23 | return self::controllersDir().$controller.'.php'; |
||
| 24 | } |
||
| 25 | |||
| 26 | public static function controllersDir(): string |
||
| 27 | { |
||
| 28 | $_ = DIRECTORY_SEPARATOR; |
||
| 29 | |||
| 30 | return app_path('Http'.$_.'Controllers'.$_); |
||
| 31 | } |
||
| 32 | |||
| 33 | public static function cbModulesNS(string $path = ''): string |
||
| 34 | { |
||
| 35 | return '\Crocodicstudio\Crudbooster\Modules\\'.$path; |
||
| 36 | } |
||
| 37 | |||
| 38 | public static function cbControllersNS(): string |
||
| 39 | { |
||
| 40 | return '\Crocodicstudio\Crudbooster\controllers'; |
||
| 41 | } |
||
| 42 | |||
| 43 | public static function ctrlNamespace(): string |
||
| 46 | } |
||
| 47 | } |