<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Config; abstract class MConfig { public abstract function get($jPfeB, $pdVyN = '', $ElyDV = true); public abstract function set($jPfeB, $Gttsd); public abstract function remove($jPfeB); public abstract function has($jPfeB); public function getWithEnv($jPfeB, $pdVyN = null) { goto YuX1U; K96au: if (empty($Gttsd)) { return $pdVyN; } goto S_NOO; qEzIz: if (null === $Gttsd) { $Gttsd = $this->get($jPfeB); } goto K96au; S_NOO: return $Gttsd; goto oyVMo; YuX1U: $Gttsd = config('env.CONFIG_' . $jPfeB); goto qEzIz; oyVMo: } public function setArray($jPfeB, $Gttsd) { $this->set($jPfeB, json_encode($Gttsd)); } public function getArray($jPfeB, $pdVyN = array(), $ElyDV = true) { goto R2FRq; LC1I2: $Gttsd = @json_decode($Gttsd, true); goto Ftawz; Ftawz: if (!is_array($Gttsd) || empty($Gttsd)) { $Gttsd = array(); } goto GSBzY; R2FRq: $Gttsd = $this->get($jPfeB, json_encode($pdVyN), $ElyDV); goto LC1I2; GSBzY: return $Gttsd; goto UwM2o; UwM2o: } public function getBoolean($jPfeB, $pdVyN = false) { goto MUruY; AOtHN: if (null === $Gttsd) { return $pdVyN; } goto lmjWv; lmjWv: return $Gttsd ? true : false; goto LXxsc; MUruY: $Gttsd = $this->get($jPfeB, null); goto AOtHN; LXxsc: } public function getInteger($jPfeB, $pdVyN = 0) { goto tcGDQ; rs227: return intval($Gttsd); goto PH_OR; tcGDQ: $Gttsd = $this->get($jPfeB, null); goto u_nQv; u_nQv: if (null === $Gttsd) { return $pdVyN; } goto rs227; PH_OR: } public function getString($jPfeB, $pdVyN = '') { goto Di5D4; vW5Rq: if (null === $Gttsd) { return $pdVyN; } goto mm6Ef; mm6Ef: return '' . $Gttsd; goto LOKT5; Di5D4: $Gttsd = $this->get($jPfeB, null); goto vW5Rq; LOKT5: } }