public function loadConfig($file)
    {
        $config;

        switch (pathinfo($file, PATHINFO_EXTENSION)) {
        case 'json':
            $config = json_decode(file_get_contents($file));
            break;
        case 'php':
            $config = include $file;
            break;
        default:
            return $this;
        }

        $this->doCallback('configurationLoaded', array($config, $this));
        
        return $config;
    }
public function loadConfig($file)
    {
        $config;

        switch (pathinfo($file, PATHINFO_EXTENSION)) {
        case 'json':
            $config = json_decode(file_get_contents($file));
            break;
        case 'php':
            $config = include $file;
            break;
        default:
            return $this;
        }

        $this->doCallback('configurationLoaded', array($config, $this));
        
        return $config;
    }
public function loadConfig ( $ file ) { $ config ; switch ( pathinfo ( $ file , PATHINFO_EXTENSION ) ) { case 'json' : $ config = json_decode ( file_get_contents ( $ file ) ) ; break ; case 'php' : $ config = include $ file ; break ; default : return $ this ; } $ this -> doCallback ( 'configurationLoaded' , array ( $ config , $ this ) ) ; return $ config ; }
Loads the configuration from a json or php file

@param string $file the full path to the configuration file

@return object
Loads the configuration from a json or php file