<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Config; abstract class MConfig { public abstract function get($ax5t3, $eS4om = '', $G9CrC = true); public abstract function set($ax5t3, $FT9zA); public abstract function remove($ax5t3); public function getWithEnv($ax5t3, $eS4om = null) { goto etiR0; etiR0: $FT9zA = config('env.CONFIG_' . $ax5t3); goto T4LFI; Xn1XO: return $FT9zA; goto IY2kr; T4LFI: if (null === $FT9zA) { $FT9zA = $this->get($ax5t3); } goto R8a8e; R8a8e: if (empty($FT9zA)) { return $eS4om; } goto Xn1XO; IY2kr: } public function setArray($ax5t3, $FT9zA) { $this->set($ax5t3, json_encode($FT9zA)); } public function getArray($ax5t3, $eS4om = array(), $G9CrC = true) { goto lz0vi; sR803: $FT9zA = @json_decode($FT9zA, true); goto iYqOW; lz0vi: $FT9zA = $this->get($ax5t3, json_encode($eS4om), $G9CrC); goto sR803; iYqOW: if (!is_array($FT9zA) || empty($FT9zA)) { $FT9zA = array(); } goto pXLU5; pXLU5: return $FT9zA; goto TaTdY; TaTdY: } public function getBoolean($ax5t3, $eS4om = false) { goto KvqKs; KvqKs: $FT9zA = $this->get($ax5t3, null); goto jUaKQ; jUaKQ: if (null === $FT9zA) { return $eS4om; } goto Fga23; Fga23: return $FT9zA ? true : false; goto LXbkM; LXbkM: } public function getInteger($ax5t3, $eS4om = 0) { goto vDbSv; egFs0: if (null === $FT9zA) { return $eS4om; } goto xZmcq; xZmcq: return intval($FT9zA); goto h3jan; vDbSv: $FT9zA = $this->get($ax5t3, null); goto egFs0; h3jan: } public function getString($ax5t3, $eS4om = '') { goto eTL1y; q_tqA: return '' . $FT9zA; goto gLY4G; YNmjk: if (null === $FT9zA) { return $eS4om; } goto q_tqA; eTL1y: $FT9zA = $this->get($ax5t3, null); goto YNmjk; gLY4G: } }