<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Config; abstract class MConfig { public abstract function get($GUcFO, $qqJ9g = '', $wbWUD = true); public abstract function set($GUcFO, $ib3B9); public abstract function remove($GUcFO); public abstract function has($GUcFO); public function getWithEnv($GUcFO, $qqJ9g = null) { goto djL50; x10Lh: if (null === $ib3B9) { $ib3B9 = $this->get($GUcFO); } goto yjhKP; djL50: $ib3B9 = config('env.CONFIG_' . $GUcFO); goto x10Lh; yjhKP: if (empty($ib3B9)) { return $qqJ9g; } goto H3qVt; H3qVt: return $ib3B9; goto ENJhc; ENJhc: } public function setArray($GUcFO, $ib3B9) { $this->set($GUcFO, json_encode($ib3B9)); } public function getArray($GUcFO, $qqJ9g = array(), $wbWUD = true) { goto TByAw; A4W9t: if (!is_array($ib3B9) || empty($ib3B9)) { $ib3B9 = array(); } goto qVR0l; TByAw: $ib3B9 = $this->get($GUcFO, json_encode($qqJ9g), $wbWUD); goto ZdVZN; qVR0l: return $ib3B9; goto VjCur; ZdVZN: $ib3B9 = @json_decode($ib3B9, true); goto A4W9t; VjCur: } public function getBoolean($GUcFO, $qqJ9g = false) { goto PvduS; eZ93C: return $ib3B9 ? true : false; goto axEHH; oyEdk: if (null === $ib3B9) { return $qqJ9g; } goto eZ93C; PvduS: $ib3B9 = $this->get($GUcFO, null); goto oyEdk; axEHH: } public function getInteger($GUcFO, $qqJ9g = 0) { goto XOAnB; jbz1g: return intval($ib3B9); goto ieurz; XOAnB: $ib3B9 = $this->get($GUcFO, null); goto mqSwU; mqSwU: if (null === $ib3B9) { return $qqJ9g; } goto jbz1g; ieurz: } public function getString($GUcFO, $qqJ9g = '') { goto fuFP5; sKayX: if (null === $ib3B9) { return $qqJ9g; } goto I3Y1C; fuFP5: $ib3B9 = $this->get($GUcFO, null); goto sKayX; I3Y1C: return '' . $ib3B9; goto skPdq; skPdq: } }