Elgg\Config::get PHP Method

get() public method

public get ( $name )
    public function get($name)
    {
        $name = trim($name);
        if (isset($this->config->{$name})) {
            return $this->config->{$name};
        }
        $value = null;
        if (!isset($this->config->site_config_loaded)) {
            $value = _elgg_services()->configTable->get($name);
        }
        // @todo document why we don't cache false
        if ($value === false) {
            return null;
        }
        $this->config->{$name} = $value;
        return $value;
    }

Usage Example

Beispiel #1
0
 /**
  * Set up config appropriately on engine boot.
  *
  * @return void
  */
 function init()
 {
     $lastcache = $this->config->get('lastcache');
     if (!defined('UPGRADING') && empty($lastcache)) {
         $this->config->set('lastcache', (int) $this->datalist->get('simplecache_lastupdate'));
     }
 }
All Usage Examples Of Elgg\Config::get