<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Provider\LBS; use Module\Vendor\Provider\ProviderTrait; class IpProvider { use ProviderTrait; public static function all() { return self::listAll(); } public static function get($HRrYd) { return self::getByName($HRrYd); } public static function first() { foreach (self::all() as $ugwYT) { return $ugwYT; } return null; } public static function firstResponse($QNsbu) { goto G1QCf; G1QCf: $ugwYT = self::first(); goto Bw8v3; HuaO4: return $ugwYT->getLocation($QNsbu); goto ALGQn; Bw8v3: if (!$ugwYT) { return null; } goto HuaO4; ALGQn: } public static function firstResponseKey($QNsbu, $lUqFD = array('province')) { goto GBWnF; TMhWW: $MZSQT = array(); goto Nb5c4; GBWnF: $jUFgk = self::firstResponse($QNsbu); goto B6fsY; Nb5c4: foreach ($lUqFD as $VKrDJ) { $MZSQT[] = $jUFgk->{$VKrDJ}; } goto ExxOn; B6fsY: if (empty($jUFgk)) { return ''; } goto TMhWW; ExxOn: return join('', $MZSQT); goto LH4rG; LH4rG: } }