認証クッキーとして利用できる値を返します。

@return	mixed	認証クッキーとして利用できる値がある場合はその値、ない場合はnull
974773
public static function GetAuthCookieValue ($name = self::DEFAULT_CONNECTION_NAME) {
		$options = static::GetAuthCookieOptions($name);

		$cookie_name_prefix	= $options['cookie_name_prefix'];
		$cookie_name_safix	= $options['cookie_name_safix'];

		$cookie_pattern	= sprintf("/^%s.+%s$/", $cookie_name_prefix, $cookie_name_safix);
		foreach (Request::GetCookies() as $name => $value) {
			if (preg_match($cookie_pattern, $name, $matches) !== 0) {
				return [$matches[0], $value];
			}
		}
		return null;
	}
581720
public function getCertificacion()
    {
        $datos = $this->getDatos();
        $idk = !empty($datos['TED']['DD']['CAF']['DA']['IDK']) ? (int)$datos['TED']['DD']['CAF']['DA']['IDK'] : null;
        return $idk ? $idk === 100 : null;
    }
60911
public function serialize()
    {
        $result = array();
        foreach ($this->getKeys() as $k => $v) {
            $result[] = $k . ': ' . $v;
        }
        foreach ($this->getVariables() as $k => $v) {
            if (is_array($v)) {
                foreach ($v as $singleValue) {
                    $result[] = $this->serializeVariable($k, $singleValue);
                }
            } else {
                $result[] = $this->serializeVariable($k, $v);
            }
        }
        $mStr = $this->finishMessage(implode(self::EOL, $result));
        return $mStr;
    }
803115
public function getAclMask()
    {
        $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
        $_aclConfig = $_config->getAccessControlConfig();

        if ($this->_aclMask == -1) {
            $this->_aclMask = $_aclConfig->getComputedMask($this->_resourceTypeName, $this->_clientPath);
        }

        return $this->_aclMask;
    }
85853
public function getDefault()
    {
        if ($this->reflection->isDefaultValueAvailable()
            and $default = $this->reflection->getDefaultValue()
        ) {
            if (is_scalar($default)) {
                return $default;
            } else {
                return $this->tostring($default);
            }
        }
        if ($this->reflection->isArray()) {
            return '[]';
        }
        if ($this->isPassedByReference()) {
            return 'null';
        } elseif ($this->reflection->getClass()) {
            // This gets injected as a new instance.
            return null;
        }
        $type = $this->getType();
        if (!$type) {
            $type = $this->extractParameterData();
        }
        // Guesstimated values:
        switch ($type) {
            case 'int': case 'integer': case 'float':
                return 0;
            case 'string':
                return "''";
            case 'array':
                return '[]';
        }
        return null;
    }
254865
public function getSingleResult()
    {
        $originalLimit = $this->limit;
        $originalUseIdentifierKeys = $this->useIdentifierKeys;

        $this->reset();
        $this->limit(1);
        $this->setUseIdentifierKeys(false);

        $result = current($this->toArray()) ?: null;

        $this->reset();
        $this->limit($originalLimit);
        $this->setUseIdentifierKeys($originalUseIdentifierKeys);

        return $result;
    }
109899
protected function getTokenData() {
    $result = null;

    $request = ObjectFactory::getInstance('request');
    $token = $request->hasHeader(self::TOKEN_HEADER) ?
        trim(str_replace(self::AUTH_TYPE, '', $request->getHeader(self::TOKEN_HEADER))) : $this->token;
    if ($token !== null) {
      $jwt = (new Parser())->parse((string)$token);

      // validate
      $data = new ValidationData();
      $data->setIssuer($this->getTokenIssuer());
      if ($jwt->validate($data) && $jwt->verify($this->getTokenSigner(), $this->key)) {
        $result = $jwt->getClaims();
      }
    }
    return $result;
  }
257493
public function getRevResult(){
        if (isset($this->_receive['Status'])) //发送是否成功，具体的返回值请参考 高级群发/模板消息 的事件推送说明
            $array['Status'] = $this->_receive['Status'];
        if (isset($this->_receive['MsgID'])) //发送的消息id
            $array['MsgID'] = $this->_receive['MsgID'];

        //以下仅当群发消息时才会有的事件内容
        if (isset($this->_receive['TotalCount']))     //分组或openid列表内粉丝数量
            $array['TotalCount'] = $this->_receive['TotalCount'];
        if (isset($this->_receive['FilterCount']))    //过滤（过滤是指特定地区、性别的过滤、用户设置拒收的过滤，用户接收已超4条的过滤）后，准备发送的粉丝数
            $array['FilterCount'] = $this->_receive['FilterCount'];
        if (isset($this->_receive['SentCount']))     //发送成功的粉丝数
            $array['SentCount'] = $this->_receive['SentCount'];
        if (isset($this->_receive['ErrorCount']))    //发送失败的粉丝数
            $array['ErrorCount'] = $this->_receive['ErrorCount'];
        if (isset($array) && count($array) > 0) {
            return $array;
        } else {
            return false;
        }
    }
1038819
public function getEncoded()
    {
        $data = serialize($this->data);
        if (function_exists('gzdeflate'))
        {
            $data = gzdeflate($data);
        }
        $data = base64_encode($data);
        $data .= $this->signature($data);
        return $data;
    }
667312
public function MakeSign()
    {
        //签名步骤一：按字典序排序参数
        ksort($this->values);
        $string = $this->ToUrlParams();
        //签名步骤二：在string后加入KEY
        $string = $string . "&key=" . $this->key;
        if ($this->IsSign_typeSet() && $this->GetSign_type() == 'HMAC-SHA256') {
            //签名步骤三：HMAC-SHA256加密
            $string = hash_hmac('sha256', $string, $this->key);
        } else {
            //签名步骤三：MD5加密
            $string = md5($string);
        }
        //签名步骤四：所有字符转为大写
        $result = strtoupper($string);
        return $result;
    }
1027926
public function getOtherFks()
    {
        $fks = array();
        foreach ($this->getTable()->getForeignKeys() as $fk) {
            if ($fk !== $this) {
                $fks[] = $fk;
            }
        }

        return $fks;
    }
1287114
public function returnFullData() {

        $aReturn = Array();

        $aInterface = $this->getSNMP()->realWalk1d(self::OID_IF_Entry);
        $aXInterface = $this->getSNMP()->realWalk1d(self::OID_IF_XEntry);

        $aInterfaceIp = $this->getSNMP()->realWalk1d(self::OID_IF_IP_ADDRESS);
        $aInterfaceIpMask = $this->getSNMP()->realWalk1d(self::OID_IF_IP_ADDRESS_MASK);
        $aInterfaceIpIndex = $this->getSNMP()->realWalk1d(self::OID_IF_IP_ADDRESS_INDEX);
 
        $aInterfaceIpAddress = $aInterfaceMaskAddress = Array();
        foreach ($aInterfaceIp as $keyInterfaceIp => $valueInterfaceIp) {
            $keyIndex = str_replace('.1.3.6.1.2.1.4.20.1.1', '.1.3.6.1.2.1.4.20.1.2', $keyInterfaceIp);
            $keyMask = str_replace('.1.3.6.1.2.1.4.20.1.1', '.1.3.6.1.2.1.4.20.1.3', $keyInterfaceIp);
            $aKeyIndexReseted = array_values($aInterfaceIpIndex[$keyIndex]);
            $aKeyMaskReseted = array_values($aInterfaceIpMask[$keyMask]);
            $aKeyReseted = array_values($valueInterfaceIp);
            $aInterfaceIpAddress[$aKeyIndexReseted[0]][] = $aKeyReseted[0];
            $aInterfaceMaskAddress[$aKeyIndexReseted[0]][] = $aKeyMaskReseted[0];
        }

        $aReturn['index'] = $aInterface[self::OID_IF_INDEX];
        $aReturn['description'] = $aInterface[self::OID_IF_DESCRIPTION];
        $aReturn['type'] = $aInterface[self::OID_IF_TYPE];
        $aReturn['type_desc'] = $this->getSNMP()->translate($aInterface[self::OID_IF_TYPE], self::$IF_TYPES);
        $aReturn['mtu'] = $aInterface[self::OID_IF_MTU];
        $aReturn['speed'] = $aInterface[self::OID_IF_SPEED];
        $aReturn['phys_address'] = $aInterface[self::OID_IF_PHYS_ADDRESS];
        $aReturn['ip_address'] = $aInterfaceIpAddress;
        $aReturn['mask_address'] = $aInterfaceMaskAddress;
        $aReturn['admin_status'] = $aInterface[self::OID_IF_ADMIN_STATUS];
        $aReturn['admin_status_desc'] = $this->getSNMP()->translate($aInterface[self::OID_IF_ADMIN_STATUS], self::$IF_ADMIN_STATES);
        $aReturn['oper_status'] = $aInterface[self::OID_IF_OPER_STATUS];
        $aReturn['oper_status_desc'] = $this->getSNMP()->translate($aInterface[self::OID_IF_OPER_STATUS], self::$IF_ADMIN_STATES);
        $aReturn['last_change'] = $aInterface[self::OID_IF_LAST_CHANGE];
        $aReturn['in_octets'] = $aInterface[self::OID_IF_IN_OCTETS];
        $aReturn['in_unicast_packets'] = $aInterface[self::OID_IF_IN_UNICAST_PACKETS];
        $aReturn['in_non_unicast_packets'] = $aInterface[self::OID_IF_IN_NON_UNICAST_PACKETS];
        $aReturn['in_discards'] = $aInterface[self::OID_IF_IN_DISCARDS];
        $aReturn['in_errors'] = $aInterface[self::OID_IF_IN_ERRORS];
        $aReturn['in_unknown_protocols'] = $aInterface[self::OID_IF_IN_UNKNOWN_PROTOCOLS];
        $aReturn['out_octets'] = $aInterface[self::OID_IF_OUT_OCTETS];
        $aReturn['out_unicast_packets'] = $aInterface[self::OID_IF_OUT_UNICAST_PACKETS];
        $aReturn['out_non_unicast_packets'] = $aInterface[self::OID_IF_OUT_NON_UNICAST_PACKETS];
        $aReturn['out_discards'] = $aInterface[self::OID_IF_OUT_DISCARDS];
        $aReturn['out_errors'] = $aInterface[self::OID_IF_OUT_ERRORS];
        $aReturn['out_queue_length'] = $aInterface[self::OID_IF_OUT_QUEUE_LENGTH];

        $aReturn['name'] = $aXInterface[self::OID_IF_NAME];
        $aReturn['high_speed'] = $aXInterface[self::OID_IF_HIGH_SPEED];
        $aReturn['alias'] = $aXInterface[self::OID_IF_ALIAS];

        return $aReturn;
    }
334311
public function MakeSign()
	{
		//签名步骤一：按字典序排序参数
		ksort($this->values);
		$string = $this->ToUrlParams();
		//签名步骤二：在string后加入KEY
		$string = $string . "&key=".WxPayConfig::$KEY;
		//签名步骤三：MD5加密
		$string = md5($string);
		//签名步骤四：所有字符转为大写
		$result = strtoupper($string);
		return $result;
	}
868793
public function getSessionKey(): ?string
    {
        $cacheKey = 'sessionkey';
        if (!isset(self::$cache[$cacheKey])) {
            $cookies = Internal\Cookies::getList(Internal\Cookies::TYPE_SERVER);
            $cookieKey = '_s';
            $key = isset($cookies[$cookieKey]) ? (string) $cookies[$cookieKey] : '';
            self::$cache[$cacheKey] = strlen((string) $key) > 70 ? $key : null;
        }
        return self::$cache[$cacheKey];
    }
1358580
public function getNext()
    {
        if ($this->currentToken !== null || strlen($this->currentInput) > 0) {
            $this->parseNextToken();

            return $this->currentToken;
        }

        return null;
    }
320904
public function get()
    {
        //获取保存值
        $raw = parent::getRaw();
        if (is_null($raw)) {
            return null;
        }

        //JSON解码
        $decoded = json_decode($raw);

        //如果解码失败,返回原始内容
        if (is_null($decoded)) {
            return $raw;
        }

        return $decoded;
    }
9024
protected function generateCodeVerifier () {
		$sp		= ['-'. '/', '_',  '~'];
		$length	= random_int(43, 128);
		$stack	= [];

		for ($i = 0;$i < $length;$i++) {
			switch (random_int(1, 4)) {
				case 1:
					$stack[] = chr(random_int(0x30, 0x39));
					break;
				case 2:
					$stack[] = chr(random_int(0x41, 0x5A));
					break;
				case 3:
					$stack[] = chr(random_int(0x61, 0x7A));
					break;
				case 4:
					$stack[] = $sp[random_int(0, 3)];
					break;
			}
		}

		if (count($stack) !== $length) {
			throw new \ErrorException('code verifierの作成に失敗しました。');
		}

		return $this->codeVerifier = implode('', $stack);
	}