lib/SBLib/Utilities/Config.php
public function get($name, $default = null, $file = null) {
            $configVal = null;

            if(is_array($this->config)) {
                if($file === null) {
                    if(count(array_column($this->config, $name)) > 0) {
                        $configVal = array_column($this->config, $name)[0];
                    } else {
                        $configVal = array_column($this->config, $name);
                    }
                } else {
                    if(count(array_column($this->config->$file, $name)) > 0) {
                        $configVal = array_column($this->config->$file, $name)[0];
                    } else {
                        $configVal = array_column($this->config->$file, $name);
                    }
                }
            }

            if(empty($configVal)) {
                return $default;
            }

            return $configVal;
        }
public function get($name, $default = null, $file = null) {
            $configVal = null;

            if(is_array($this->config)) {
                if($file === null) {
                    if(count(array_column($this->config, $name)) > 0) {
                        $configVal = array_column($this->config, $name)[0];
                    } else {
                        $configVal = array_column($this->config, $name);
                    }
                } else {
                    if(count(array_column($this->config->$file, $name)) > 0) {
                        $configVal = array_column($this->config->$file, $name)[0];
                    } else {
                        $configVal = array_column($this->config->$file, $name);
                    }
                }
            }

            if(empty($configVal)) {
                return $default;
            }

            return $configVal;
        }
public function get ( $ name , $ default = null , $ file = null ) { $ configVal = null ; if ( is_array ( $ this -> config ) ) { if ( $ file === null ) { if ( count ( array_column ( $ this -> config , $ name ) ) > 0 ) { $ configVal = array_column ( $ this -> config , $ name ) [ 0 ] ; } else { $ configVal = array_column ( $ this -> config , $ name ) ; } } else { if ( count ( array_column ( $ this -> config -> $ file , $ name ) ) > 0 ) { $ configVal = array_column ( $ this -> config -> $ file , $ name ) [ 0 ] ; } else { $ configVal = array_column ( $ this -> config -> $ file , $ name ) ; } } } if ( empty ( $ configVal ) ) { return $ default ; } return $ configVal ; }
Gets a config value from the config array.

@param string $name
@param string $file
@param mixed $default

@return mixed
Gets a config value from the config array .