<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Provider\SiteUrl; use ModStart\Core\Exception\BizException; class SiteUrlProvider { private static $list = array(); private static $init = false; public static function register($yzKqK) { self::$list[] = $yzKqK; } public static function get() { if (!self::$init) { self::$init = true; foreach (self::$list as $ynzcc => $nfRLq) { if (is_string($nfRLq)) { self::$list[$ynzcc] = app($nfRLq); } } } return self::$list; } public static function updateBiz($X1NGK, $MyYDh, $oa5ye = '', $quZRe = array()) { goto p7fae; xln46: BizException::throwsIfEmpty('SiteUrlProvider.Error -> url empty', $MyYDh); goto FyWd9; FyWd9: foreach (self::get() as $zWFYu) { $zWFYu->update($MyYDh, $oa5ye, $quZRe); } goto Lhmve; p7fae: $quZRe['biz'] = $X1NGK; goto xln46; Lhmve: } public static function update($MyYDh, $oa5ye = '', $quZRe = array()) { BizException::throwsIfEmpty('SiteUrlProvider.Error -> url empty', $MyYDh); foreach (self::get() as $zWFYu) { $zWFYu->update($MyYDh, $oa5ye, $quZRe); } } public static function delete($MyYDh) { BizException::throwsIfEmpty('SiteUrlProvider.Error -> url empty', $MyYDh); foreach (self::get() as $zWFYu) { $zWFYu->delete($MyYDh); } } }