<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Config; use ModStart\Core\Util\SerializeUtil; abstract class MConfig { public abstract function get($l6tBV, $dMLhR = '', $hNo8v = true); public abstract function set($l6tBV, $Mczr_); public abstract function remove($l6tBV); public abstract function has($l6tBV); public function getWithEnv($l6tBV, $dMLhR = null) { goto UESIN; UESIN: $Mczr_ = config('env.CONFIG_' . $l6tBV); goto ib0RG; k37YK: return $Mczr_; goto wVyyL; ib0RG: if (null === $Mczr_) { $Mczr_ = $this->get($l6tBV); } goto XR1vT; XR1vT: if (empty($Mczr_)) { return $dMLhR; } goto k37YK; wVyyL: } public function setArray($l6tBV, $Mczr_) { $this->set($l6tBV, SerializeUtil::jsonEncode($Mczr_)); } public function getArray($l6tBV, $dMLhR = array(), $hNo8v = true) { goto LneZ9; Nu8kF: $Mczr_ = @json_decode($Mczr_, true); goto tehGT; tehGT: if (!is_array($Mczr_) || empty($Mczr_)) { $Mczr_ = array(); } goto OF5Ls; OF5Ls: return $Mczr_; goto gEUuX; LneZ9: $Mczr_ = $this->get($l6tBV, SerializeUtil::jsonEncode($dMLhR), $hNo8v); goto Nu8kF; gEUuX: } public function getBoolean($l6tBV, $dMLhR = false) { goto rBUu2; jKgRl: return $Mczr_ ? true : false; goto UAmqt; GmoI8: if (null === $Mczr_) { return $dMLhR; } goto jKgRl; rBUu2: $Mczr_ = $this->get($l6tBV, null); goto GmoI8; UAmqt: } public function getInteger($l6tBV, $dMLhR = 0) { goto jB5E7; jB5E7: $Mczr_ = $this->get($l6tBV, null); goto AsBTX; BtXES: return intval($Mczr_); goto pwvPP; AsBTX: if (null === $Mczr_) { return $dMLhR; } goto BtXES; pwvPP: } public function getString($l6tBV, $dMLhR = '') { goto EWRvC; ZpAao: return '' . $Mczr_; goto L_nY7; R8RGK: if (null === $Mczr_) { return $dMLhR; } goto ZpAao; EWRvC: $Mczr_ = $this->get($l6tBV, null); goto R8RGK; L_nY7: } }