public static getInstance ( ) : |
||
return |
public static function getInstance()
{
if (is_null(self::$instance)) {
self::$instance = new Container();
}
return self::$instance;
}
/** * Gets config value * * @param string $name An option name * @return mixed Returns configuration value for the specified key */ public static function config($name) { //This is only working with yaml config. //If you get error here looks like "Call to a member function get() on a non-object", //you probably have not migrated your config.ini to config.yml. //Please run php app/bin/upgrade_20130624_migrate_config.php return Container::getInstance()->config->get($name); }