Wrapper method for retrieve() call.

@see  Memento\Single\Agent::retrieve()
@see  Memento\Group\Agent::retrieve()

@return mixed    returns the object that was stored or null if not found
17267
public function retrieve()
    {
        $args = func_get_args();
        list($key, $groupKey) = $this->getKeys($args);
        $this->engine->setGroupKey($groupKey);

        $expired = false;
        if ($groupKey instanceof Group\Key) {
            if (array_key_exists(2, $args)) {
                $expired = $args[2];
            }
        } else {
            if (array_key_exists(1, $args)) {
                $expired = $args[1];
            }
        }

        if (!$this->engine->isValid($key, $expired)) {
            return null;
        }

        return $this->engine->retrieve($key, $expired);
    }
1337945
final public function fetch()
    {
        if(!isset($this->_entity))
        {
            $context = $this->getContext();
            $context->entity  = null;

            if ($this->invokeCommand('before.fetch', $context) !== false)
            {
                $context->entity = $this->_actionFetch($context);
                $this->invokeCommand('after.fetch', $context);
            }

            $this->_entity = KObjectConfig::unbox($context->entity);
        }

        return $this->_entity;
    }
337863
protected function retrieve($key)
    {
        if (($cache = $this->memcache->get($this->key . $key)) !== false) {
            return $cache;
        }

        return null;
    }
272482
public function get($key)
    {
        $this->hit = false;

        $inMemoryValue = InMemoryAdapter::getInstance()->get($key);
        if (InMemoryAdapter::getInstance()->isHit()) {
            $this->hit = true;
            return $inMemoryValue;
        }

        $result = $this->getFromDatabase($key);

        if (false === empty($result)) {
            $ttl = new DateTime($result[self::CACHE_TTL]);

            if ($ttl >= new DateTime()) {
                $this->hit = true;
                $value     = $this->restoreDataStructure($result[self::CACHE_VALUE]);
                InMemoryAdapter::getInstance()->set($key, $value, 0);
                return $value;
            }
            $this->delete($key);
        }

        return (null !== $this->nextAdapter) ? $this->nextAdapter->get($key) : null;
    }
228891
public static function retrieve($context)
    {
        if ($context instanceof sfContext || $context instanceof sfProjectConfiguration) {
            return $context->getEventDispatcher();
        } elseif (isset($GLOBALS['dispatcher'])) {
            return $GLOBALS['dispatcher'];
        }

        $refClass = new ReflectionClass(get_class($context));

        if ($refClass->hasProperty('dispatcher')) {
            return self::retrieveByDispatcherProperty($refClass, $context);
        } elseif ($refClass->hasProperty('configuration')) {
            return self::retrieveByConfigurationProperty($refClass, $context);
        }
    }
745407
public function retrieve($key)
    {
        $key = (string)$key;
        if ($cache = $this->loadCache()) {
            if (isset($cache[$key])) {
                if (!$this->isExpired($cache[$key]['time'], $cache[$key]['expire'])) {
                    return unserialize($cache[$key]['data']);
                }
            }
        }
        return null;
    }
1204491
public function get($key)
    {
        if ($this->isAcceptable($key)) {
            $key = $this->modelKey($key);
        }

        if ($this->has($key)) {
            return $this->objects[$key];
        }

        return null;
    }
650115
public function retrieve(string $key)
    {
        $token = null;

        $storageInstance = $this->getRepository();

        $token = $storageInstance->{$key}?? null;

        return $token;
    }
886467
public function get()
    {
        $q = "SELECT " . $this->fields . " FROM `" . $this->table . "` " . $this->join;
        if ($this->condition) {
            $q .= " WHERE {$this->condition}";
        }
        if ($this->group) {
            $q .= " GROUP BY {$this->group}";
            if ($this->having) {
                $q .= " HAVING {$this->having}";
            }
        }
        if ($this->order) {
            $q .= " ORDER BY {$this->order}";
        }
        if ($this->limit) {
            $q .= " LIMIT {$this->limit}";
        }
        if ($this->offset) {
            $q .= " OFFSET {$this->offset}";
        }
        if ($this->procedure) {
            $q .= " PROCEDURE {$this->procedure}";
        }
        if ($this->into) {
            $q .= " INTO {$this->into}";
        }
        if ($this->for_update) {
            $q .= " FOR UPDATE";
        }
        if ($this->lock_in_share_mode) {
            $q .= " LOCK IN SHARE MODE";
        }
        return $this->connection->queryAssoc($q, $this->params);
    }
456699
public function get()
    {
        do {
            $response = $this->redis->rpop("job_queue");
            usleep(500);
        } while ($response === null);
        return unserialize($response);
    }
925897
public function fetchObject()
	{
		if( isset( $this->rows[$this->cursor] ) )
			return $this->rows[$this->cursor];
		return FALSE;
	}
1245248
protected function retrieve($key)
        {
            if (!File::exists($this->path . $key)) {
                return null;
            }

            // File based caches store have the expiration timestamp stored in
            // UNIX format prepended to their contents. We'll compare the
            // timestamp to the current time when we read the file.
            if (time() >= substr($cache = fgc($this->path . $key), 0, 10)) {
                return $this->forget($key);
            }

            return unserialize(substr($cache, 10));
        }
1028785
public function retrieve($key)
    {
        if (strpos($key, '.') !== FALSE) {
            list($name, $value) = explode('.', $key);

            if (empty($this->forms)) {
                $data        = $this->getModel()->where('name', '=', $name)->get();
                $this->forms = $this->processRetrievedData($data);
            }

            return Arr::get($this->forms, "{$name}.{$value}");
        }
    }
763138
protected function retrieve($key)
    {
        if (!is_null($cache = $this->redis->get($key))) {
            return unserialize($cache);
        }

        return null;
    }
1178971
public static function retrieve($publickey = null, $secretkey = null)
    {
        return parent::g_retrieve(get_class(), self::getUrl(), $publickey, $secretkey);
    }
638751
public function get()
    {
        // Define columns
        $columns = count($this->columns)? $this->getColumnsString() : $this->table . '.*';

        // Define root
        $root = 'SELECT ' . $columns . ' FROM ' . $this->table;

        // Define joins
        $joins = count($this->joins)? $this->getJoinString() : '';

        // Define where conditions
        $where = $this->getWhereString();

        // Define where in conditions
        $whereIn = $this->getWhereInString();

        // Define group by
        $groupBy = ($this->groupBy)? 'GROUP BY ' . $this->groupBy : '';

        // Define order
        $orderBy = ($this->orderBy)? $this->getOrderByString() : '';

        // Define limit
        $limit = 'LIMIT ' . $this->offset . ',' . $this->limit;

        // Build query
        $this->query = implode(' ', [$root, $joins, $where, $whereIn, $groupBy, $orderBy, $limit]);

        // Debug
        if ($this->app->config('queries.log')) {
            file_put_contents($this->app->config('queries.log'), date('Y-m-d h:i:s') . ' - ' . $this->query . "\r\n", FILE_APPEND);
        }

        // Prepare statement
        $this->statement = $this->pdo->prepare($this->query);

        // Bind where values
        if (count($this->wheres)) {
            $this->bindWheres();
        }

        // Execute statement
        if (!$this->statement->execute()) {
            throw new \PDOException('Error reading from database', 500);
        }

        // Return results
        $result = $this->statement->fetchAll(\PDO::FETCH_ASSOC);

        // Reset
        $this->reset();

        // Return result
        return $result;
    }
967282
public function retrieveById($identifier) {
        if (!$this->isValidIdentifierValue($identifier)) {
            return null;
        }
        /** @var RecordInterface $user */
        $user = $this->createEmptyUserRecord()->fromPrimaryKey($identifier, [], $this->getRelationsToFetch());

        return $this->validateUser($user, null);
    }