Returns URL of the resources' ACL collection
@param bool $refresh should ACL URL be reread
@return string
355271
public function getAclUrl(bool $refresh = false): string {
        if ($refresh || $this->aclUrl === null) {
            $request  = new Request('HEAD', $this->fedora->sanitizeUri($this->uri));
            $response = $this->fedora->sendRequest($request);
            $this->extractAcl($response);

            // Fedora 4.7.5 doesn't provide ACL link header for binary resources
            // if the ACL id directly attached to the resource (sic!).
            // As a fallback we can try to extract it from the metadata (which
            // is done automatically in the setMetadata() method being called
            // by the getMetadata(true) method).
            if ($this->aclUrl == '') {
                $this->getMetadata(true);
            }
        }
        return $this->aclUrl;
    }
1372041
public function getIndexNames($refresh = false)
    {
        if (!isset($this->_indexNames) || $refresh) {
            $this->initIndexesInfo();
        }

        return $this->_indexNames;
    }
1313651
public function getAccessTokenByRefreshToken(array $params = array())
    {
        $params = array(
            'grant_type' => 'refresh_token',
			'client_id' => $this->getClientId(),
            'client_secret' => $this->getClientSecret(),
		) + $params;
        if (empty($params['refresh_token'])) {
            $accessToken = $this->getAccessToken();
            if (empty($accessToken['refresh_token'])) {
                throw new InvalidArgumentException('Not configuration refresh_token');
            }
            $params['refresh_token'] = $accessToken['refresh_token'];
        }

        if (!empty($params['scope']) && is_array($params['scope'])) {
            $params['scope'] = implode(',', $params['scope']);
        }
        $request = $this->request('GET', 'oauth/2.0/token', $params);
        $this->accessToken = $request->response()->getJson(true);
        return $this->accessToken;
    }
168892
public function buildUrlParams($refreshToken)
    {
        $params = 'client_id=' . $this->helper->getWebsiteConfig(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CLIENT_ID
        )
            . '&client_secret=' . $this->helper->getWebsiteConfig(
                \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_CLIENT_SECRET_ID
            )
            . '&refresh_token=' . $refreshToken . '&grant_type=refresh_token';

        return $params;
    }
980837
public static function getUrl($resource, $absolute = false) {
		if (strpos ( $resource, '//' ) !== false) {
			return $resource;
		}
		if ($absolute) {
			return self::$siteURL . self::ASSETS_FOLDER . $resource;
		}
		return ltrim ( self::ASSETS_FOLDER, '/' ) . $resource;
	}
1267727
public function getRefreshToken($refresh_token)
    {
        $sql   = sprintf('SELECT * from %s where refresh_token = :refresh_token', $this->config['refresh_token_table']);
        $token = $this->fetch($sql, compact('refresh_token'));
        if ($token) {
            // convert expires to epoch time
            $token['expires'] = strtotime($token['expires']);
        }

        return $token;
    }
417786
public function getUrl( $absolute = TRUE ){
		$url	= new ADT_URL( getEnv( 'REQUEST_URI' ) );
		if( $absolute ){
			$url->setScheme( getEnv( 'REQUEST_SCHEME' ) );
			$url->setHost( getEnv( 'HTTP_HOST' ) );
		}
		return $url;
	}
76857
protected function buildRouteMaps($refresh = false)
    {
        if ($this->routeMaps && !$this->debug && !$refresh) {
            return $this;
        }

        foreach ($this->routes as $key => $routeItem) {
            $this->routeMaps[$routeItem->getName()] = $key;
        }

        return $this;
    }
278653
public function getRefreshToken($refresh_token)
    {
        $result = $this->client->getItem(array(
            "TableName"=> $this->config['refresh_token_table'],
            "Key" => array('refresh_token'   => array('S' => $refresh_token))
        ));
        if ($result->count()==0) {
            return false ;
        }
        $token = $this->dynamo2array($result);
        $token['expires'] = strtotime($token['expires']);

        return $token;
    }
492596
public function getPluginWrappersByRow($refresh = false)
    {
        if ($this->pluginWrappers->count() < 1) {
            return [];
        }

        // Per request caching
        if (!empty($this->wrappersByRows) && !$refresh) {
            return $this->wrappersByRows;
        }

        $this->wrappersByRows = $this->orderPluginWrappersByRow(
            $this->pluginWrappers->toArray()
        );

        return $this->wrappersByRows;
    }
783281
public function getConfig($refresh = false)
    {
        return $this->getCache('plugins-config', $refresh, function () {
            return [
                'wei' => [
                    'aliases' => $this->getWeiAliases(),
                ],
                'app' => [
                    'controllerMap' => $this->getAppControllerMap(),
                ],
                'plugin' => [
                    'pluginClasses' => $this->getPluginClasses(true),
                ],
            ];
        });
    }
762714
protected function getActualColumns($refresh = false)
  {
    if (is_null($this->actual_columns) || $refresh) {
      $m = $this->getManager();

      $q = 'SHOW COLUMNS FROM `' . $m->getPrefix() . $this->getTable() . '`';

      $this->actual_columns = false;

      if ($res = $m->query($q)->fetchAll(\PDO::FETCH_ASSOC)) {
        foreach ($res as $row) {
          $this->actual_columns[] = $row['Field'];
        }
      }
    }

    return $this->actual_columns;
  }
98979
public function getOauthRefreshToken($refresh_token)
    {
        $appid = $this->config->get('appid');
        $url = "https://api.weixin.qq.com/sns/oauth2/refresh_token?appid={$appid}&grant_type=refresh_token&refresh_token={$refresh_token}";
        return $this->httpGetForJson($url);
    }
300329
public function getLink($rel, $absolute = true)
    {
        if ($this->hasLink($rel)) {
            return parent::getLink($rel, $absolute);
        }

        if ($rel === 'self') {
            return $this->getProperty('endpoint');
        }

        if ($rel === '#ui') {
            return $this->getProperty('uri');
        }

        if ($rel === '#manage-variables') {
            return $this->getUri() . '/variables';
        }

        return $this->getUri() . '/' . ltrim($rel, '#');
    }
1322146
public function getToken($forceRefresh = false)
    {
        $cacheKey = $this->getCacheKey();
        $cached = $this->getCache()->fetch($cacheKey);

        if ($forceRefresh || empty($cached)) {
            $token = $this->getTokenFromServer();

            // XXX: T_T... 7200 - 1500
            $this->getCache()->save($cacheKey, $token[$this->tokenJsonKey], $token['expires_in'] - 1500);

            return $token[$this->tokenJsonKey];
        }

        return $cached;
    }
558662
public function getFieldName($refresh = false)
    {
        if (!$this->fieldName || $refresh) {
            // Prevent double '/'
            $names = array_values(array_filter(explode('/', (string) $this->getName(true)), 'strlen'));

            $control = array_values(array_filter(explode('/', (string) $this->getControl()), 'strlen'));

            $names = array_merge($control, $names);

            $control = array_shift($names);

            $names = array_map(
                function ($value) {
                    return '[' . $value . ']';
                },
                $names
            );

            $this->fieldName = $control . implode('', $names);
        }

        return $this->fieldName;
    }
1332899
public function refreshUrl($url)
    {
        $urls = is_array($url) ? $url : func_get_args();

        return $this->request($urls, 'urls', 'RefreshCdnUrl');
    }