Find a @DataObject by hash

@param string $hash

@return \DataObject|null
187482
public function findByHash($hash)
    {
        return $this->hashWorkingRecord->get()->filter($this->hashDbField, $hash)->first();
    }
53174
public function getLastCacheDate(string $hash, ?string $context = null): ?\DateTime
    {
        @trigger_error(sprintf('The "%s::getLastCacheDate" method is deprecated and should not more be used.', StorageManager::class), E_USER_DEPRECATED);

        $lastDate = null;

        foreach ($this->cacheAdapters as $cacheAdapter) {
            $date = $cacheAdapter->getLastUpdateDate($hash, $context);

            if ($date && ($lastDate === null || $date > $lastDate)) {
                $lastDate = $date;
            }
        }

        return $lastDate;
    }
145242
protected function getItemByHash($hash)
    {
        foreach ($this->items as $item) {
            if ($item->getHash() === $hash) {
                return $item;
            }
        }
        
        return false;
    }
569888
public function findBySha1($sha1Hash)
    {
        $query = $this->createQuery();
        $query->matching($query->equals('sha1', $sha1Hash));
        $resources = $query->execute()->toArray();
        foreach ($this->addedResources as $importedResource) {
            if ($importedResource->getSha1() === $sha1Hash) {
                $resources[] = $importedResource;
            }
        }

        return $resources;
    }
520517
public function get_hash($key = 0)
	{
		$hashes = $this->get_hashes();
		if (isset($hashes[$key]))
		{
			return $hashes[$key];
		}

		return null;
	}
609655
public function getSessionUID($hash)
    {
        $query = "SELECT uid FROM {$this->config->table_sessions} WHERE hash = :hash";
        $query_prepared = $this->dbh->prepare($query);
        $query_params = [
            'hash' => $hash
        ];
        $query_prepared->execute($query_params);

        if ($query_prepared->rowCount() == 0) {
            return false;
        }

        return $query_prepared->fetch(\PDO::FETCH_ASSOC)['uid'];
    }
705411
public function get($hash = null)
    {
        // If the hash is not received, get it from the request
        $hash = $hash?: $this->app->request->token();

        // Determine token path
        $path = $this->path($hash);

        // Abort if the session does not exist
        if (!file_exists($path)) {
            return false;
        }

        // Update token file modification time
        touch($path);

        // Get session data
        $data = json_decode(file_get_contents($path), true);

        // Return session
        return $data;
    }
512212
public function file($hash) {
		$path = $this->decode($hash);
		
		return ($file = $this->stat($path)) ? $file : $this->setError(elFinder::ERROR_FILE_NOT_FOUND);
		
		if (($file = $this->stat($path)) != false) {
			if ($realpath) {
				$file['realpath'] = $path;
			}
			return $file;
		}
		return $this->setError(elFinder::ERROR_FILE_NOT_FOUND);
	}
459266
public function getInfo($hash) {
    $regex_pattern = '/^\$[a-z, 1-6]{1,6}\$/i';
    preg_match($regex_pattern, $hash, $matches);

    if(sizeof($matches) > 0) {
      list($method) = $matches;
    } else {
      $method = null;
    }

    switch($method) {
      case self::SHA256:
      case self::SHA512:
      case self::PBKDF2:
        $param = array();
        list( , , $params) = explode('$', $hash);
        parse_str($params, $param);
        $info['options'] = $param;
      break;

      case self::BCRYPT;
        list( , , $cost) = explode('$', $hash);
        $info['options'] = array(
          'cost' => $cost,
        );
      break;
    }
    $info['algo'] = $method;
    return $info;
  }
775375
function getData($object)
    {
        if (! $this->has($object) )
            throw new \Exception('Object Not Found.');


        $hash = $this->genETag($object);
        return $this->_objs[$hash]['data'];
    }
137526
public function retrieve_query(string $hash): ?array
  {
    if ( isset($this->queries[$hash]) ){
      if ( \is_string($this->queries[$hash]) ){
        $hash = $this->queries[$hash];
      }
      return $this->queries[$hash];
    }
    return null;
  }
1282397
public function findOneByRegisteraddresshashIgnoreHidden($hash)
    {
        $query = $this->createQuery();
        $query->getQuerySettings()->setIgnoreEnableFields(TRUE);
        //$query->getQuerySettings()->setRespectStoragePage(FALSE);

        $query->matching(
            $query->equals('registeraddresshash', $hash )
        );

        return $query->execute()->getFirst();
    }
262860
protected function findViewFromHash($hash)
    {
        $finder = app('view')->getFinder();

        if (isset($this->reflection['viewfinderViews'])) {
            $property = $this->reflection['viewfinderViews'];
        } else {
            $reflection = new \ReflectionClass($finder);
            $property = $reflection->getProperty('views');
            $property->setAccessible(true);
            $this->reflection['viewfinderViews'] = $property;
        }

        foreach ($property->getValue($finder) as $name => $path){
            if (sha1($path) == $hash || md5($path) == $hash) {
                return $name;
            }
        }
    }
1177982
public function fromHash( $hash )
    {
        if ( !is_array( $hash ) )
        {
            return new Value( [] );
        }
        $metas = [];
        foreach ( $hash as $hashItem )
        {
            if ( !is_array( $hashItem ) )
            {
                continue;
            }
            $meta = new Meta();
            $meta->setName( $hashItem["meta_name"] );
            $meta->setContent( $hashItem["meta_content"] );
            $metas[] = $meta;
        }

        return new Value( $metas );
    }
252950
public function getResource(string $hash, ?string $context = null)
    {
        return $this->read($this->adapters, $hash, $context);
    }
596789
public function retrieve ($hash)
    {
        $cached = $this->memcached->get($this->prefix . $hash);

        if ($this->memcached->getResultCode() === \Memcached::RES_SUCCESS) {
            $json = json_decode($cached, true);

            if (isset($json['token'], $json['expires'])) {
                return new AccessToken($json['token'], DateTime::createFromFormat('U', $json['expires']));
            }
        }
    }
595947
public function update($hash = null, $data)
    {
        // If the hash is not received, get it from the request
        $hash = $hash?: $this->app->request->token();

        // Update the file in the tokens storage
        $token = $this->get($hash);
        $data = array_merge_recursive($token, $data);
        $stored = file_put_contents($this->path($hash), json_encode($data));

        // Return the data or false in case of failure
        return ($stored)? $data : false;
    }