Method: g::get
Gets an global value by key
Info
Syntax
g::get($key=null, $default=null)
Parameters
- $key (mixed) The key to look for. Pass false or null to return the entire globals array.
- $default (mixed) Optional default value, which should be returned if no element has been found
Return (mixed)
Example
g::get('var1', 'some other value');
// returns 'some value' if var1 has been set earlier, otherwise returns 'some other value'