Habari\Options::get_all_options PHP Метод

get_all_options() публичный Метод

Fetch all options from the options table into local storage
public get_all_options ( )
    public function get_all_options()
    {
        // Set some defaults here
        $this->options = array('pagination' => 10, 'comments_require_id' => false);
        if (Config::exists('default_options')) {
            $this->options = array_merge($this->options, Config::get('default_options'));
        }
        if (DB::is_connected()) {
            $results = DB::get_results('SELECT name, value, type FROM {options}', array());
            foreach ($results as $result) {
                if ($result->type == 1) {
                    $this->options[$result->name] = unserialize($result->value);
                } else {
                    $this->options[$result->name] = $result->value;
                }
            }
        }
        if (Config::exists('static_options')) {
            $this->options = array_merge($this->options, Config::get('static_options'));
        }
    }