重置指定手机的频率限制

@param string $mobile
@return $this
960651
public function resetLimit($mobile)
    {
        wei()->counter->remove($this->getMobileKey($mobile));
        wei()->counter->remove($this->getIpKey());

        return $this;
    }
391453
public function sendMobileMessage($mobile, $type, $param = [], $uid = 0) 
	{
		if (!$this->plat) {
			return hst_message(hst_lang('hstcms::manage.sms.plat.choose.error'));
		}
		$this->type = CommonSmsModel::getType($type);
		if (!$this->type) {
			return hst_message(hst_lang('hstcms::manage.sms.plat.choose.error'));
		}
		$code = CommonSmsCodeModel::_buildCode();
		$content = $this->_buildContent($code, $type);
		$number = $this->checkTodayNum($mobile, $type);
		if (hst_message_verify($number)) {
			return $number;
		}
		$param['code'] = $code;
		$param['product'] = hst_config('sms', 'product');
		$result = $this->plat->sendMobileMessage($mobile, $content, $param);
		if (hst_message_verify($result)) {
			return $result;
		}
		$results = CommonSmsCodeModel::addInfo($mobile, $type, $code, $number);
		if($results) {
			CommonSmsModel::addInfo($mobile, $type, $code, $content, json_encode($param), (int)$result['res']['type'], $result['res']['requestid'], $uid);
		}
		return true;
	}
561592
public function touch()
    {
        if ($this->storage->supportsTouching()) {
            $this->storage->touchKey($this->key);
            $this->timeModified = null;
        }

        return $this;
    }
1008422
public function setFullPhone($number)
    {
        /** We clean the string that is coming. Can be formatted or not */

        $number = preg_replace("/[^0-9]/", '', $number);
        $number = $number[0] == 0 ? substr($number, 1) : $number;

        $number = str_split($number, 1);
        $areaCode = array_shift($number) . array_shift($number);
        $phone = implode('', $number);

        $this->setAreaCode($areaCode);
        $this->setNumber($phone);

        return $this->areaCode . $this->number;
    }
713616
public static function isMobile()
    {
        // 如果有HTTP_X_WAP_PROFILE则一定是移动设备
        if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])) {
            return true;
        }
        // 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息
        if (isset ($_SERVER['HTTP_VIA'])) {
            // 找不到为flase,否则为true
            return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false;
        }
        // 脑残法，判断手机发送的客户端标志,兼容性有待提高
        if (isset ($_SERVER['HTTP_USER_AGENT'])) {
            $clientKeyWords = [
                'nokia',
                'sony',
                'ericsson',
                'mot',
                'samsung',
                'htc',
                'sgh',
                'lg',
                'sharp',
                'sie-',
                'philips',
                'panasonic',
                'alcatel',
                'lenovo',
                'iphone',
                'ipod',
                'blackberry',
                'meizu',
                'android',
                'netfront',
                'symbian',
                'ucweb',
                'windowsce',
                'palm',
                'operamini',
                'operamobi',
                'openwave',
                'nexusone',
                'cldc',
                'midp',
                'wap',
                'mobile'];
            // 从HTTP_USER_AGENT中查找手机浏览器的关键字
            if (preg_match("/(" . implode('|', $clientKeyWords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))) {
                return true;
            }
        }
        // 协议法，因为有可能不准确，放到最后判断
        if (isset ($_SERVER['HTTP_ACCEPT'])) {
            // 如果只支持wml并且不支持html那一定是移动设备
            // 如果支持wml和html但是wml在html之前则是移动设备
            if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html')))) {
                return true;
            }
        }
        return false;
    }
371923
public function setText($text)
    {
        $this->template->trySet('Content', $this->app->_($text));

        return $this;
    }
511799
public function setCell(Cell $cell)
    {
        $this->cells[(string)$cell->getColumn()] = $cell;
        ksort($this->cells);

        return $this;
    }
262468
public function getByMobile($mobile) {
        try {
            $result = $this->soap()->getInfoByMobile([
                'auth'  => $this->config['auth'],
                'mobile' => $mobile
            ]);
        } catch (SoapFault $e) {
            throw $e;
        }

        return $this->parseResult($result);
    }
22761
public function validateMobile($input)
    {
        $mobile = $this->cache->get($this->sessionKey . 'mobile');
        $valid = strcasecmp($mobile, $input) === 0;
        return $valid;
    }
175920
public function setLocation($location)
    {
        if ($this->getSoapClient() instanceof \SoapClient) {
            $this->getSoapClient()->__setLocation($location);
        }
        return $this;
    }
974925
public function setMobile() {
		if ($this->isMobile === null) {
			$this->isMobile();
		}
		$forceMobile = $this->Controller->getRequest()->getSession()->read('User.mobile');

		if ($forceMobile !== null && !$forceMobile) {
			$this->setMobile = false;
		} elseif ($forceMobile !== null && $forceMobile || $this->isMobile()) {
			$this->setMobile = true;
		} else {
			$this->setMobile = false;
		}

		//$urlParams = Router::getParams(true);
		$urlParams = [];
		if (!isset($urlParams['pass'])) {
			$urlParams['pass'] = [];
		}
		$urlParams = array_merge($urlParams, $urlParams['pass']);
		unset($urlParams['pass']);
		if (isset($urlParams['prefix'])) {
			unset($urlParams['prefix']);
		}

		if ($this->setMobile) {
			$urlParams['?']['mobile'] = 0;
			$url = Router::url($urlParams);
			$this->Controller->set('desktopUrl', $url);
		} else {
			$urlParams['?']['mobile'] = 1;
			$url = Router::url($urlParams);
			$this->Controller->set('mobileUrl', $url);
		}

		Configure::write('User.setMobile', (int)$this->setMobile);

		if (!$this->setMobile) {
			return;
		}

		$this->Controller->viewBuilder()->setClassName('Theme');
		$this->Controller->viewBuilder()->setTheme('Mobile');
	}
1011553
public function setPhone($phone) {
        $phone = trim(str_replace('-', '', $phone));

        if (empty($phone))
            throw new Exception('Phone must be set and cannot be empty.');

        $this->phone = $phone;

        return $this;
    }
397939
public function setMin($min)
  {
    if (!is_numeric($min))
    {
      $min = null;
    }
    $this->min = $min;

    return $this;
  }
890682
protected function isMobile()
    {
        $detect = new MobileDetect();

        return ($detect->isMobile() === false && $detect->isTablet() === false) ? false : true;
    }
371537
public function toDevice($device)
    {
        if (is_array($device)) {
            $this->devices = array_merge($device, $this->devices);

            return $this;
        }
        $this->devices[] = $device;

        return $this;
    }
563421
public function isMobile()
    {
        deprecationWarning(
            'RequestHandlerComponent::isMobile() is deprecated. Use ServerRequest::is(\'mobile\') instead.'
        );

        $request = $this->getController()->getRequest();

        return $request->is('mobile') || $this->accepts('wap');
    }
905085
public function isMobile() {
		if ($this->isMobile !== null) {
			return $this->isMobile;
		}

		$this->isMobile = Configure::read('User.isMobile');
		if ($this->isMobile !== null) {
			return $this->isMobile;
		}
		$this->isMobile = (bool)$this->detect();

		Configure::write('User.isMobile', (int)$this->isMobile);
		return $this->isMobile;
	}