1 | <?php |
||
7 | trait PathHelpers |
||
8 | { |
||
9 | /** |
||
10 | * Get a value from the config array. |
||
11 | * |
||
12 | * @param string|array $value |
||
13 | * |
||
14 | * @return mixed |
||
15 | */ |
||
16 | abstract public function get($value); |
||
17 | |||
18 | /** |
||
19 | * Return true if config array has given value. |
||
20 | * |
||
21 | * @param mixed $value |
||
22 | * |
||
23 | * @return bool |
||
24 | */ |
||
25 | abstract public function has($value); |
||
26 | |||
27 | /** |
||
28 | * Return the app path. |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | public function getAppPath() |
||
36 | |||
37 | /** |
||
38 | * Return the database directory path. |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getDatabaseDirectory() |
||
46 | |||
47 | /** |
||
48 | * Return the migration directory path. |
||
49 | * |
||
50 | * @param string $path |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getMigrationDirectory($path = '') |
||
58 | |||
59 | /** |
||
60 | * Return the factory directory path. |
||
61 | * |
||
62 | * @param string $path |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public function getFactoryDirectory($path = '') |
||
70 | |||
71 | /** |
||
72 | * Return the seeds directory path. |
||
73 | * |
||
74 | * @param string $path |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | public function getSeedDirectory($path = '') |
||
82 | |||
83 | /** |
||
84 | * Make database directory structure if it doesn't exist. |
||
85 | */ |
||
86 | public function getAllDatabaseDirectories() |
||
95 | |||
96 | /** |
||
97 | * Get the console directory path. |
||
98 | * |
||
99 | * @param string $path |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | public function getConsoleDirectory($path = '') |
||
114 | |||
115 | /** |
||
116 | * Get the commands directory path. |
||
117 | * |
||
118 | * @param string $path |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | public function getCommandsDirectory($path = '') |
||
129 | } |
||
130 |