bytic /
hello
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ByTIC\Hello\Utility; |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Class PathHelper |
||
| 7 | * @package ByTIC\Hello\Utility |
||
| 8 | */ |
||
| 9 | class PathHelper |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param null $path |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 13 | * @return string |
||
| 14 | */ |
||
| 15 | public static function keys($path = null) |
||
| 16 | { |
||
| 17 | return dirname(dirname(__DIR__)) |
||
| 18 | . DIRECTORY_SEPARATOR . 'resources' |
||
| 19 | . DIRECTORY_SEPARATOR . 'keys' |
||
| 20 | . DIRECTORY_SEPARATOR . $path; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param $path |
||
| 25 | * @param $theme |
||
| 26 | * @return string |
||
| 27 | */ |
||
| 28 | public static function views($path, $theme = null) |
||
| 29 | { |
||
| 30 | return static::viewsTheme($theme) . $path; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param $theme |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public static function viewsTheme($theme = null) |
||
| 38 | { |
||
| 39 | $theme = $theme ? $theme : ThemeHelper::theme(); |
||
| 40 | return static::viewsBase() . DIRECTORY_SEPARATOR . $theme . DIRECTORY_SEPARATOR . 'views'; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public static function viewsBase() |
||
| 47 | { |
||
| 48 | return dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'themes'; |
||
| 49 | } |
||
| 50 | } |
||
| 51 |