![]()  | 
  
    NanoFramework 1.4.0
    
   A tiny PHP Framework 
   | 
 
Manages constants. More...
Static Public Member Functions | |
| static | setRoot (string $root) | 
| static | getRoot () | 
| static | load () | 
| static | getEnv (string $key) | 
| static | setEnv (string $key, string $value) | 
Static Protected Attributes | |
| static | $root = './' | 
| static array | $data = [] | 
Manages constants.
All constants can either be defined in the .env file (see dotEnvSyntax for more information) or using DotEnv::setEnv(). 
Definition at line 10 of file DotEnv.php.
      
  | 
  static | 
This method returns the value associated to the given key or the default value if not found.
| string | $key | the key to look for | 
Definition at line 74 of file DotEnv.php.
      
  | 
  static | 
This retrieves the current root directory where the .env file is located.
Definition at line 40 of file DotEnv.php.
      
  | 
  static | 
This method opens the .env file at the current root if it exists and loads all the data. 
Definition at line 48 of file DotEnv.php.
      
  | 
  static | 
This method sets a new value for the given key.
| string | $key | the key to set the value to | 
| string | $value | the value to memorize | 
Definition at line 89 of file DotEnv.php.
      
  | 
  static | 
The root where to find the .env file can be changed with this method.
| string | $root | the new root directory | 
Definition at line 27 of file DotEnv.php.
      
  | 
  staticprotected | 
The list of all constants known to DotEnv.
Definition at line 20 of file DotEnv.php.
      
  | 
  staticprotected | 
The directory where to find the .env file.
Definition at line 15 of file DotEnv.php.