1 | <?php |
||
5 | trait PathHelpers |
||
6 | { |
||
7 | /** |
||
8 | * Get a value from the config array. |
||
9 | * |
||
10 | * @param string|array $value |
||
11 | * |
||
12 | * @return mixed |
||
13 | */ |
||
14 | abstract public function get($value); |
||
15 | |||
16 | /** |
||
17 | * Return the database directory path. |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | public function getDatabaseDirectory() |
||
25 | |||
26 | /** |
||
27 | * Return the migration directory path. |
||
28 | * |
||
29 | * @param string $path |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | public function getMigrationDirectory($path = '') |
||
37 | |||
38 | /** |
||
39 | * Return the factory directory path. |
||
40 | * |
||
41 | * @param string $path |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | public function getFactoryDirectory($path = '') |
||
49 | |||
50 | /** |
||
51 | * Return the seeds directory path. |
||
52 | * |
||
53 | * @param string $path |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getSeedDirectory($path = '') |
||
61 | |||
62 | /** |
||
63 | * Make database directory structure if it doesn't exist. |
||
64 | */ |
||
65 | public function getAllDatabaseDirectories() |
||
74 | |||
75 | /** |
||
76 | * Get the console directory path. |
||
77 | * |
||
78 | * @param string $path |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | public function getConsoleDirectory($path = '') |
||
88 | |||
89 | /** |
||
90 | * Get the commands directory path. |
||
91 | * |
||
92 | * @param string $path |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | public function getCommandsDirectory($path = '') |
||
102 | |||
103 | /** |
||
104 | * Add a final slash to a path if it doesn't exist. |
||
105 | * |
||
106 | * @param string $path |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | protected function addFinalSlash($path) |
||
118 | } |
||
119 |