<?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($pXrNS) { self::$list[] = $pXrNS; } public static function get() { if (!self::$init) { self::$init = true; foreach (self::$list as $F4wee => $SxG_W) { if (is_string($SxG_W)) { self::$list[$F4wee] = app($SxG_W); } } } return self::$list; } public static function updateBiz($zPmUw, $dQdfo, $DvG1n = '', $FRVtF = array()) { goto zLQro; zLQro: $FRVtF['biz'] = $zPmUw; goto Yrz6z; Yrz6z: BizException::throwsIfEmpty('SiteUrlProvider.Error -> url empty', $dQdfo); goto HaVPl; HaVPl: foreach (self::get() as $hKL6P) { $hKL6P->update($dQdfo, $DvG1n, $FRVtF); } goto e1GcO; e1GcO: } public static function update($dQdfo, $DvG1n = '', $FRVtF = array()) { BizException::throwsIfEmpty('SiteUrlProvider.Error -> url empty', $dQdfo); foreach (self::get() as $hKL6P) { $hKL6P->update($dQdfo, $DvG1n, $FRVtF); } } public static function delete($dQdfo) { BizException::throwsIfEmpty('SiteUrlProvider.Error -> url empty', $dQdfo); foreach (self::get() as $hKL6P) { $hKL6P->delete($dQdfo); } } }