<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Config; abstract class MConfig { public abstract function get($dwwIV, $UZN94 = '', $qxmvG = true); public abstract function set($dwwIV, $wvO30); public abstract function remove($dwwIV); public abstract function has($dwwIV); public function getWithEnv($dwwIV, $UZN94 = null) { goto z4RmS; z4RmS: $wvO30 = config('env.CONFIG_' . $dwwIV); goto WZd1X; WZd1X: if (null === $wvO30) { $wvO30 = $this->get($dwwIV); } goto mAgAY; mAgAY: if (empty($wvO30)) { return $UZN94; } goto tcsgG; tcsgG: return $wvO30; goto PAJgv; PAJgv: } public function setArray($dwwIV, $wvO30) { $this->set($dwwIV, json_encode($wvO30)); } public function getArray($dwwIV, $UZN94 = array(), $qxmvG = true) { goto hJHKN; hJHKN: $wvO30 = $this->get($dwwIV, json_encode($UZN94), $qxmvG); goto JGDbz; JGDbz: $wvO30 = @json_decode($wvO30, true); goto zZpK6; zZpK6: if (!is_array($wvO30) || empty($wvO30)) { $wvO30 = array(); } goto Lfkah; Lfkah: return $wvO30; goto nslF1; nslF1: } public function getBoolean($dwwIV, $UZN94 = false) { goto wex7v; DSJDz: if (null === $wvO30) { return $UZN94; } goto M_D1D; M_D1D: return $wvO30 ? true : false; goto NYqIM; wex7v: $wvO30 = $this->get($dwwIV, null); goto DSJDz; NYqIM: } public function getInteger($dwwIV, $UZN94 = 0) { goto uNHSX; zy726: if (null === $wvO30) { return $UZN94; } goto U7Ve3; U7Ve3: return intval($wvO30); goto xjHCi; uNHSX: $wvO30 = $this->get($dwwIV, null); goto zy726; xjHCi: } public function getString($dwwIV, $UZN94 = '') { goto uKcKV; W4Yxv: return '' . $wvO30; goto hVRUq; uKcKV: $wvO30 = $this->get($dwwIV, null); goto h17o3; h17o3: if (null === $wvO30) { return $UZN94; } goto W4Yxv; hVRUq: } }