Constructs an ACL INI section key from a given Request.

@param array $params The request params
@return string Hash with named keys for controller, plugin and prefix
4411
protected function _constructIniKey($params) {
		$res = $params['controller'];
		if (!empty($params['prefix'])) {
			$res = $params['prefix'] . "/$res";
		}
		if (!empty($params['plugin'])) {
			$res = $params['plugin'] . ".$res";
		}
		return $res;
	}
569850
protected function _getClientParams( array $params, array $prefixes = array( 'f', 'l', 'd', 'a' ) )
	{
		$list = array();

		foreach( $params as $key => $value )
		{
			if( in_array( $key[0], $prefixes ) && $key[1] === '-' ) {
				$list[$key] = $value;
			}
		}

		return $list;
	}
1017747
public function get($params = null) {
		$this->buffer = $this->getConfigs();

		if (isset($params)) {
			$params = trim($params);
			$params_list = explode('/', $params);
			$params_count = count($params_list);

			for ($i=0; $i<$params_count; $i++) {
				if ($i == $params_count) { return $this->buffer[$params_list[$i]]; }

				$this->buffer = $this->buffer[$params_list[$i]];
			}
		}

		return $this->buffer;
	}
1270889
private function buildParams($params)
    {
        $keys = is_array($params) ? $params : func_get_args();

        $array = [];

        foreach ($keys as $key) {
            if (property_exists($this, $key))
                $array = array_merge($array, [$key => $this->$key]);
        }

        return $array;
    }
53158
public function getUrl($params): string
    {
        // prepare params
        $params = $this->getParams($params);

        // retrieve URL
        return Router::getUrl(
            $this->getModule(),
            $this->getController(),
            $params
        );
    }
391853
protected function buildAuthenticator($params = array())
    {
        $signature = new Signature($this->networkKey);
        $signature->getNoncer()->setLength(self::NONCE_LENGTH);

        $authenticator = array(
            'identifier' => $this->networkId,
            'time' => $signature->getRequestTime(),
            'hash' => $signature->generate($params),
            'nonce' => $signature->getNonce(),
        );

        return $authenticator;
    }
603021
protected function getAccessTokenRequest(array $params)
    {
        $method  = $this->getAccessTokenMethod();
        $url     = $this->getAccessTokenUrl($params);
        $options = $this->optionProvider->getAccessTokenOptions($this->getAccessTokenMethod(), $params);

        return $this->getRequest($method, $url, $options);
    }
220522
public function buildQuery(array $params = [])
    {
        $params = array_merge($params, [
          'user_login' => $this->login,
          'api_key' => $this->apiKey
        ]);
        return http_build_query($params);
    }
772393
public function build($params)
    {
        return ((isset($params['scheme'])) ? $params['scheme'] . '://' : '')
            . ((isset($params['user'])) ? $params['user'] . ((isset($params['pass'])) ? ':' . $params['pass'] : '') . '@' : '')
            . ((isset($params['host'])) ? $params['host'] : '')
            . ((isset($params['port'])) ? ':' . $params['port'] : '')
            . ((isset($params['path'])) ? $params['path'] : '')
            . ((isset($params['query'])) ? '?' . $params['query'] : '')
            . ((isset($params['fragment'])) ? '#' . $params['fragment'] : '');
    }
31593
protected function getAccessTokenRequest(array $params)
    {
        $request = parent::getAccessTokenRequest($params);
        $uri = $request->getUri()
            ->withUserInfo($this->clientId, $this->clientSecret);

        return $request->withUri($uri);
    }
806602
public static function getCacheKey($params, $content = null)
    {
        $key = SSViewer::config()->get('global_key');
        $viewer = new SSViewer_FromString($key);
        $globalKey = md5($viewer->process(ArrayData::create([])));
        $argsKey = md5(serialize($params)) . '#' . md5(serialize($content));

        return "{$globalKey}#{$argsKey}";
    }
794021
protected function _constructPdoDsn(array $params)
    {
        $dsn = 'sqlite:';
        if (isset($params['path'])) {
            $dsn .= $params['path'];
        } elseif (isset($params['memory'])) {
            $dsn .= ':memory:';
        }

        return $dsn;
    }
423957
public function path(array $params = array())
    {
        $this->build();
        
        $path = [];
        if ($this->_modules)
            $path = $this->_modules;
        $path[] = $this->_controller;
        $path[] = isset($params['action']) ? $params['action'] : $this->_action;
        
        $format = isset($params['format']) ? '.' . $params['format'] : '';
        
        return implode('/', $path) . $format;
    }
316319
public function getAuthorizationCode(array $params)
	{
		if (isset($params['transaction_state'])) {
			$params['transaction_state'] = json_encode($params['transaction_state']);
		}

		return $this->post('access/getAuthorizationCode', $params);
	}
1026142
private function withClientSecret(array $params)
    {
        $message = $params['scope'].$params['timestamp'].$params['client_id'].$params['state'];
        $signature = $this->signer->sign($message);
        $params['client_secret'] = $this->encoder->base64UrlEncode($signature);

        return $params;
    }
404051
protected function cacheKey(array $params = [])
    {
        $prefix   = config('antares/ui-components::cache');
        $required = ['resource', 'uid', 'brand_id', 'name'];
        if (count(array_only($params, $required)) != count($required)) {
            return $prefix;
        }
        $ordered = [];
        foreach ($required as $key) {
            $ordered[$key] = array_get($params, $key);
        }
        return implode('.', array_merge([config('antares/ui-components::cache')], $ordered));
    }
87992
public function fetchRequestToken(array $params = [])
    {
        $this->setAccessToken(null);
        $defaultParams = [
            'oauth_consumer_key' => $this->consumerKey,
            'oauth_callback' => $this->getReturnUrl(),
            //'xoauth_displayname' => Yii::$app->name,
        ];
        if (!empty($this->scope)) {
            $defaultParams['scope'] = $this->scope;
        }

        $request = $this->createRequest()
            ->setMethod($this->requestTokenMethod)
            ->setUrl($this->requestTokenUrl)
            ->setData(array_merge($defaultParams, $params));

        $this->signRequest($request);

        $response = $this->sendRequest($request);

        $token = $this->createToken([
            'params' => $response
        ]);
        $this->setState('requestToken', $token);

        return $token;
    }