libs/Settings.php
public function get($key, $section = 'basic', $type = null, $options = array(), $language = true)
    {
        // system settings
        if (array_key_exists($section, $this->settings)) {
            if (array_key_exists($key, $this->settings[$section])) {
                $settings = $this->settings[$section][$key];

                if ($settings->getType() === null && $type !== null) {
                    $settings->setType($type);
                    $this->em->flush();
                }

                return $settings;
            }
        }

        return $this->save($key, $section, $type, $options, $language);
    }
public function get($key, $section = 'basic', $type = null, $options = array(), $language = true)
    {
        // system settings
        if (array_key_exists($section, $this->settings)) {
            if (array_key_exists($key, $this->settings[$section])) {
                $settings = $this->settings[$section][$key];

                if ($settings->getType() === null && $type !== null) {
                    $settings->setType($type);
                    $this->em->flush();
                }

                return $settings;
            }
        }

        return $this->save($key, $section, $type, $options, $language);
    }
public function get ( $ key , $ section = 'basic' , $ type = null , $ options = array ( ) , $ language = true ) { // system settings if ( array_key_exists ( $ section , $ this -> settings ) ) { if ( array_key_exists ( $ key , $ this -> settings [ $ section ] ) ) { $ settings = $ this -> settings [ $ section ] [ $ key ] ; if ( $ settings -> getType ( ) === null && $ type !== null ) { $ settings -> setType ( $ type ) ; $ this -> em -> flush ( ) ; } return $ settings ; } } return $ this -> save ( $ key , $ section , $ type , $ options , $ language ) ; }
Gets settings by key and section.
@param  String    $key
@param  String    $section
@param  string    $type
@return String
@throws Exception
Gets settings by key and section .