1 | <?php |
||
26 | class Env |
||
27 | { |
||
28 | /** |
||
29 | * The .env contents |
||
30 | * |
||
31 | * @var array $contents |
||
32 | */ |
||
33 | private $contents = array(); |
||
34 | |||
35 | /** |
||
36 | * Creates a new instance of Env |
||
37 | * |
||
38 | * @param string $file The .env to parse |
||
39 | * @param bool $origin_exception Whether or not to throw ParseException in the .env |
||
40 | * |
||
41 | * @throws \InvalidArgumentException If the file does not exist or is not readable |
||
42 | */ |
||
43 | 66 | public function __construct($file, $origin_exception = false) |
|
53 | |||
54 | /** |
||
55 | * Parses the .env and returns the contents statically |
||
56 | * |
||
57 | * @param string $file The .env to parse |
||
58 | * @param bool $origin_exception Whether or not to throw ParseException in the .env |
||
59 | * |
||
60 | * @return array The .env contents |
||
61 | */ |
||
62 | 66 | public static function parse($file, $origin_exception = false) |
|
68 | |||
69 | /** |
||
70 | * Returns the contents of the .env |
||
71 | * |
||
72 | * @return array The .env contents |
||
73 | */ |
||
74 | 42 | public function getContents() |
|
78 | } |
||
79 |