MOON
Server: Apache
System: Linux u18017238.onlinehome-server.com 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User: emblazeone (1003)
PHP: 7.3.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/emblazeone/public_html/lyyt/common/models/ConfigPar.php
<?php
namespace common\models;

//    use common\models\Category;

class ConfigPar extends WbpActiveRecord
{
    public static $imageTypes = [];

    public static $configs=[];

    public static function getAll(){
        $all=static::find()->all();
        foreach ($all as $conf){
            self::$configs[$conf->name]=$conf->value;
        }
    }

    public static function get($name){
        if(!count(self::$configs)) {
            static::getAll();
        }

        if(isset(self::$configs[$name])) return static::$configs[$name];
        return NULL;
    }

    public static function tableName()
    {
        return '{{%config}}';
    }

}