openmediavault  4.0 (Arrakis)
The open network attached storage solution
Static Public Member Functions | List of all members
OMV\Environment Class Reference

Static Public Member Functions

static get ($name, $default=NULL)
 
static set ($name, $value)
 
static getString ($name, $default=NULL)
 
static getBoolean ($name, $default=NULL)
 
static getInteger ($name, $default=NULL)
 
static getDouble ($name, $default=NULL)
 
static getFloat ($name, $default=NULL)
 

Detailed Description

Access the environment variables defined in PHP and within the file /etc/default/openmediavault.

Member Function Documentation

◆ get()

static OMV\Environment::get (   $name,
  $default = NULL 
)
static

Get the specified environment variable. If the variable does not exist and default is not NULL, then the specified default value will be returned, otherwise an exception is thrown.

Parameters
nameThe name of the environment variable.
defaultThe default value. Defaults to NULL.
Returns
The value of the specified environment variable, or the specified default value if the variable does not exist.
Exceptions

The documentation for this class was generated from the following file: