Gets all the members in the  sorted set
@param bool|false $forceRefresh whether to force a refresh or not
@return array	the members in the set
@throws InvalidConfigException
548571
public function getData($forceRefresh = false) {
		if ($forceRefresh || $this->_data === null) {
			if ($this->name === null) {
				throw new InvalidConfigException(get_class($this)." requires a name!");
			}
			$this->_data = $this->getConnection()->getSlave()->hgetall($this->name);
		}
		return $this->_data;
	}
612950
public function getTokens($refresh = false)
    {
        if (! $this->_tokens || $refresh) {
            if ($refresh) {
                $this->_firstToken = null;
            }
            $this->_tokens       = array();
            $this->_activeTokens = array();
            $tokenSelect = $this->tracker->getTokenSelect();
            $tokenSelect->andReceptionCodes()
                ->forRespondentTrack($this->_respTrackId);

            $tokenRows = $tokenSelect->fetchAll();
            $prevToken = null;
            foreach ($tokenRows as $tokenData) {

                $token = $this->tracker->getToken($tokenData);

                $this->_tokens[$token->getTokenId()] = $token;

                // While we are busy, set this
                if ($token->hasSuccesCode()) {
                    $this->_activeTokens[$token->getRoundId()] = $token;
                }

                // Link the tokens
                if ($prevToken) {
                    $prevToken->setNextToken($token);
                }
                $prevToken = $token;
            }
        }

        return $this->_tokens;
    }
742078
public function getRefreshToken($refreshToken)
    {
        $refreshTokenDataMapper = $this->getTokenDataMapper(Entity\RefreshToken::class);

        $token = $refreshTokenDataMapper->findByToken($refreshToken);

        if (! $token instanceof Entity\RefreshToken) {
            return;
        }

        return [
            'refresh_token' => $token->getToken(),
            'client_id'     => $token->getClient()->getUuid(),
            'user_id'       => $token->getUser() ? $token->getUser()->getUuid() : null,
            'expires'       => $token->getExpiryUTCTimestamp(),
            'scope'         => $token->getScopesString(),
        ];
    }
1003042
public static function getTableIndices( $tableName, $refresh = false )
	{
		static $data = [];
		
		if( isset( $data['$tableName'] ) ) {
			return $data['$tableName'];
		}
		
		$indexes = \Yii::$app->db->schema->getTableIndexes( $tableName, $refresh );
		
		foreach( $indexes as $index ) {
			$data[ $tableName ][ $index->name ] = $index;
		}
		
		return $data;
	}
57754
public function actionRefresh(): array
    {
        $model = Yii::createObject($this->modelClass);
        $model->invalidate();

        return $model->getAvailableAndAssignedRoutes();
    }
322151
public function ticket($forceRefresh = false)
    {
        $key = self::TICKET_CACHE_PREFIX.$this->getAccessToken()->getFingerprint();
        $ticket = $this->getCache()->fetch($key);

        if (!$forceRefresh && !empty($ticket)) {
            return $ticket;
        }

        $result = $this->parseJSON('get', [self::API_TICKET]);

        $this->getCache()->save($key, $result['ticket'], $result['expires_in'] - 500);

        return $result['ticket'];
    }
187779
public function getShopOrderStatusCodeObject($bRefresh = false)
    {
        if (true === $bRefresh) {
            $this->shopOrderStatusCodeObject = null;
        }
        if (null === $this->shopOrderStatusCodeObject) {
            $this->shopOrderStatusCodeObject = TdbShopOrderStatusCode::GetNewInstance();
            $aFilter = array(
                'shop_id' => $this->getOrder()->fieldShopId,
                'system_name' => $this->getShopOrderStatusCode(),
            );
            if (false === $this->shopOrderStatusCodeObject->LoadFromFields($aFilter)) {
                $shopId = $this->getOrder()->fieldShopId;
                $e = new TPkgShopOrderStatusException_OrderStatusCodeNotFound(
                    "no order status code in shop [{$shopId}] with system_name [{$this->getShopOrderStatusCode()}]",
                    array('orderStatus' => $this)
                );
                $e->setStatusCode($this->getShopOrderStatusCode())
                    ->setShopId($this->getOrder()->fieldShopId);
                throw $e;
            }
        }

        return $this->shopOrderStatusCodeObject;
    }
255519
protected function getModels($refresh = false)
    {
        if ($this->_models === null || $refresh) {
            $this->_models = [];

            foreach ($this->data as $message) {
                $this->_models[] = [
                    'message' => $message[0],
                    'level' => $message[1],
                    'category' => $message[2],
                    'time' => $message[3] * 1000, // time in milliseconds
                    'trace' => $message[4]
                ];
            }
        }

        return $this->_models;
    }
733642
public function listing($forceUpdate = false)
    {
        if (empty($this->groups) || $forceUpdate) {
            $this->all();
        }
        $ret = [];
        foreach ($this->groups['groups'] as $e) {
            $ret[$e['name']] = (int) $e['id'];
        }

        return $ret;
    }
180079
public function getCollection($name, $refresh = false)
    {
        if ($refresh || !array_key_exists($name, $this->_collections)) {
            $this->_collections[$name] = $this->selectCollection($name);
        }

        return $this->_collections[$name];
    }
122187
public function findAllToRefreshToken(bool $force = false)
    {
        $query = $this->newQuery();

        return $force ? $query->get() : $query->whereNull('token')->get();
    }
836615
public function getDissServices(bool $lazy = false): array {
        $ret     = $weights = [];

        // by metadata propeties match
        $query   = '
            SELECT ?uri ?format WHERE {
              {
                SELECT ?uri (count(distinct ?prop1) as ?countReq) (count(distinct ?prop2) as ?countOpt) (count(distinct ?match3) as ?baseReq) (count(distinct ?match4) as ?baseOpt)
                WHERE {
                  ?uri a ?@ .
                  OPTIONAL {
                    ?@ ?prop1 ?value1 .
                    ?match1 ?@ / ^?@ ?uri .
                    ?match1 ?@ ?prop1 .
                    ?match1 ?@ ?matchValue1 .
                    ?match1 ?@ "true"^^xsd:boolean .
                    FILTER (str(?value1) = str(?matchValue1))
                  } OPTIONAL {
                    ?@ ?prop2 ?value2 .
                    ?match2 ?@ / ^?@ ?uri .
                    ?match2 ?@ ?prop2 .
                    ?match2 ?@ ?matchValue2 .
                    ?match2 ?@ "false"^^xsd:boolean .
                    FILTER (str(?value2) = str(?matchValue2))
                  } OPTIONAL {
                    ?uri ?@ / ^?@ ?match3 .
                    ?match3 ?@ "true"^^xsd:boolean .
                  } OPTIONAL {
                    ?uri ?@ / ^?@ ?match4 .
                    ?match4 ?@ "false"^^xsd:boolean .
                  }
                }
                GROUP BY ?uri
                HAVING (?countReq >= ?baseReq && (?baseOpt = 0 || ?countOpt > 0) && ?baseOpt + ?baseReq > 0)
              }
              OPTIONAL {
                ?uri ?@ ?format .
              }
            }
        ';
        $param1  = [
            $this->getUri(true),
            RC::relProp(), RC::idProp(),
            RC::get('fedoraServiceMatchProp'),
            RC::get('fedoraServiceMatchValue'),
            RC::get('fedoraServiceMatchRequired'),
        ];
        $param2  = [
            RC::idProp(), RC::relProp(),
            RC::get('fedoraServiceMatchRequired')
        ];
        $param   = array_merge([RC::get('fedoraServiceClass')], $param1, $param1, $param2, $param2, [
            RC::get('fedoraServiceRetFormatProp')]);
        $query   = new SimpleQuery($query, $param);
        $results = $this->fedora->runQuery($query);
        foreach ($results as $i) {
            if (!isset($i->uri)) {
                continue; // no matching dissemination services
            }
            $format = new Format((string) $i->format);
            if (!isset($weights[$format->format]) || $weights[$format->format] < $format->weight) {
                $ret[$format->format]     = (string) $i->uri;
                $weights[$format->format] = $format->weight;
            }
        }

        // directly attached
        $services = [];
        $meta     = $this->getMetadata();
        foreach ($meta->allResources(RC::get('fedoraHasServiceProp')) as $id) {
            $uri            = $this->fedora->getResourceById($id)->getUri(true);
            $services[$uri] = new Service($this->fedora, $uri);
            foreach ($services[$uri]->getFormats() as $format) {
                if (!isset($weights[$format->format]) || $weights[$format->format] < $format->weight) {
                    $ret[$format->format]     = $uri;
                    $weights[$format->format] = $format->weight;
                }
            }
        }

        // create service objects if not in lazy mode
        if (!$lazy) {
            foreach (array_keys($ret) as $k) {
                $ret[$k] = $services[$ret[$k]] ?? new Service($this->fedora, $ret[$k]);
            }
        }

        return $ret;
    }
1276944
public function getRefreshToken()
    {
        if (is_string($this->refresh_token) && $this->isValidToken() ){

            $this->refreshToken = $this->token_type . ' ' . $this->refresh_token;

            return $this->refreshToken;
        }

        return false;
    }
1367688
public function ticket($forceRefresh = false)
    {
        $cacheKey = [__CLASS__, 'appId' => Yii::$app->wechat->appId];
        if ($forceRefresh || ($ticket = Yii::$app->wechat->cache->get($cacheKey)) === false) {
            $response = $this->post(self::API_TICKET, ['type' => 'jsapi']);
            Yii::$app->wechat->cache->set($cacheKey, $response['ticket'], $response['expires_in'] - 500);
            return $response['ticket'];
        }
        return $ticket;
    }
1067537
static public function fetchUnactivated( $sort = false, $limit = 10, $offset = 0 )
    {
        $accountDef = eZUserAccountKey::definition();
        $settingsDef = eZUserSetting::definition();

        return eZPersistentObject::fetchObjectList(
            eZUser::definition(), null, null, $sort,
            array(
                'limit' => $limit,
                'offset' => $offset
            ),
            true, false, null,
            array( $accountDef['name'], $settingsDef['name'] ),
            " WHERE contentobject_id = {$accountDef['name']}.user_id"
                . " AND {$settingsDef['name']}.user_id = contentobject_id"
                . " AND is_enabled = 0"
        );
    }
149385
public function getToken($forceRefresh = false)
    {
        $cacheKey = [__CLASS__, 'appId' => Yii::$app->wechat->appId];
        if ($forceRefresh || ($accessToken = Yii::$app->wechat->cache->get($cacheKey)) === false) {
            $token = $this->getTokenFromServer();
            Yii::$app->wechat->cache->set($cacheKey, $token[$this->tokenJsonKey], $token['expires_in'] - 1500);
            return $token[$this->tokenJsonKey];
        }
        return $accessToken;
    }
1218206
public function getTicket(bool $refresh = false, string $type = 'jsapi'): array
    {
        $cacheKey = sprintf('easywechat.basic_service.jssdk.ticket.%s.%s', $type, $this->getAppId());

        if (!$refresh && $this->getCache()->has($cacheKey)) {
            return $this->getCache()->get($cacheKey);
        }

        $result = $this->castResponseToType(
            $this->requestRaw($this->ticketEndpoint, 'GET', ['query' => ['type' => $type]]),
            'array'
        );

        $this->getCache()->set($cacheKey, $result, $result['expires_in'] - 500);

        if (!$this->getCache()->has($cacheKey)) {
            throw new RuntimeException('Failed to cache jssdk ticket.');
        }

        return $result;
    }