<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Config; abstract class MConfig { public abstract function get($HQKqq, $PDSnF = '', $dIczt = true); public abstract function set($HQKqq, $mdHu1); public abstract function remove($HQKqq); public abstract function has($HQKqq); public function getWithEnv($HQKqq, $PDSnF = null) { goto o3ahk; o3ahk: $mdHu1 = config('env.CONFIG_' . $HQKqq); goto GLFiI; nu6Sx: if (empty($mdHu1)) { return $PDSnF; } goto SFRIl; GLFiI: if (null === $mdHu1) { $mdHu1 = $this->get($HQKqq); } goto nu6Sx; SFRIl: return $mdHu1; goto OE8yg; OE8yg: } public function setArray($HQKqq, $mdHu1) { $this->set($HQKqq, json_encode($mdHu1)); } public function getArray($HQKqq, $PDSnF = array(), $dIczt = true) { goto QBFtE; FmI8g: $mdHu1 = @json_decode($mdHu1, true); goto k4pZ6; k4pZ6: if (!is_array($mdHu1) || empty($mdHu1)) { $mdHu1 = array(); } goto mez0Z; QBFtE: $mdHu1 = $this->get($HQKqq, json_encode($PDSnF), $dIczt); goto FmI8g; mez0Z: return $mdHu1; goto GJxhp; GJxhp: } public function getBoolean($HQKqq, $PDSnF = false) { goto dv8M1; dv8M1: $mdHu1 = $this->get($HQKqq, null); goto H8V3H; H8V3H: if (null === $mdHu1) { return $PDSnF; } goto zpWXh; zpWXh: return $mdHu1 ? true : false; goto QRLRQ; QRLRQ: } public function getInteger($HQKqq, $PDSnF = 0) { goto fJOAh; fJOAh: $mdHu1 = $this->get($HQKqq, null); goto OmnCk; OmnCk: if (null === $mdHu1) { return $PDSnF; } goto i0Ufb; i0Ufb: return intval($mdHu1); goto Gx2xP; Gx2xP: } public function getString($HQKqq, $PDSnF = '') { goto Ntv_r; jcLsn: return '' . $mdHu1; goto JOlia; J3HcD: if (null === $mdHu1) { return $PDSnF; } goto jcLsn; Ntv_r: $mdHu1 = $this->get($HQKqq, null); goto J3HcD; JOlia: } }