Get a list of all segment hashes that currently exist, indexed by idSite.
@return array
510944
public function getSegmentHashesByIdSite()
    {
        //Get a list of hashes of all segments that exist now
        $sql = "SELECT DISTINCT definition, enable_only_idsite FROM " . Common::prefixTable('segment')
            . " WHERE deleted = 0";
        $rows = Db::fetchAll($sql);
        $segmentHashes = array();
        foreach ($rows as $row) {
            $idSite = (int)$row['enable_only_idsite'];
            if (! isset($segmentHashes[$idSite])) {
                $segmentHashes[$idSite] = array();
            }
            $segmentHashes[$idSite][] = Segment::getSegmentHash($row['definition']);
        }

        return $segmentHashes;
    }
402848
public function segments(int $index = null)
    {
        $segments = collect(explode('/', $this->path()))
            ->filter(function ($value) {
                return $value !== '';
            })
            ->values()
            ->toArray();

        if (! is_null($index)) {
            return $this->segment($index);
        }

        return $segments;
    }
1274841
public function getSeriesHash()
  {
    $hash = [];

    if ($this->getMeta('title') !== null) {
      $hash[] = $this->getMeta('title');
    }

    if ($this->getMeta('group') !== null) {
      $hash[] = $this->getMeta('group');
    }

    if ($this->getMeta('quality') !== null) {
      $hash[] = $this->getMeta('quality');
    }

    if ($this->getMeta('type')) {
      $hash[] = $this->getMeta('type');

      if ($this->getMeta('special') !== null) {
        $hash[] = $this->getMeta('special') . '.' . md5($this->size . $this->recordUpdated);
      }

      if ($this->getMeta('season') !== null) {
        $hash[] = $this->getMeta('season');
      }
    }

    return implode('-', $hash);
  }
197774
public function segments()
    {
        $segments = explode('/', $this->decodedPath());

        return array_values(array_filter($segments, function ($value) {
            return $value !== '';
        }));
    }
1283541
private static function getHashids(){
		if (is_null(static::$hashIds)){

			$minSlugLength = config('hashslug.minSlugLength', 5);
			if(isset(static::$minSlugLength)) {
				$minSlugLength = static::$minSlugLength;
			}

			if(isset(static::$modelSalt)) {
				$modelSalt = static::$modelSalt;
			}else{
				$modelSalt = get_called_class();
			}

			if(isset(static::$alphabet)) {
				$alphabet = static::$alphabet;
			}else{
				$alphabet = config('hashslug.alphabet', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');
			}

			$salt = config('hashslug.appsalt', config('app.key')) . $modelSalt;
			
			// This is impotant!
			// Don't use a weak hash, otherwise
			// your app key can be exposed
			// http://carnage.github.io/2015/08/cryptanalysis-of-hashids
			$salt = hash('sha256', $salt);

			static::$hashIds = new \Hashids\Hashids($salt, $minSlugLength, $alphabet);
		}

		return static::$hashIds;
	}
217146
protected function getCurrentHash()
    {
        if ($this->currentHash === null)
        {
            $this->currentHash = md5(
                $this->request->fullUrl() .
                $this->request->method() .
                $this->request->getClientIp()
            );
        }

        return $this->currentHash;
    }
931419
def previous_hashes(self) -> Optional[Iterable[Hash32]]:
        
        return self.get_prev_hashes(self.header.parent_hash, self.chaindb)
1004159
public function getProcessedReplacements()
    {
        $values = $this->getReplacements();

        if (null !== ($git = $this->getGitHashPlaceholder())) {
            $values[$git] = $this->getGitHash();
        }

        if (null !== ($git = $this->getGitShortHashPlaceholder())) {
            $values[$git] = $this->getGitHash(true);
        }

        if (null !== ($git = $this->getGitTagPlaceholder())) {
            $values[$git] = $this->getGitTag();
        }

        if (null !== ($git = $this->getGitVersionPlaceholder())) {
            $values[$git] = $this->getGitVersion();
        }

        if (null !== ($date = $this->getDatetimeNowPlaceHolder())) {
            $values[$date] = $this->getDatetimeNow($this->getDatetimeFormat());
        }

        $sigil = $this->getReplacementSigil();

        foreach ($values as $key => $value) {
            unset($values[$key]);

            $values["$sigil$key$sigil"] = $value;
        }

        return $values;
    }
849878
private function getResultIndices()
    {
        $indices = array();

        if (count($this->params->getIdSites()) > 1
            || $this->forceIndexedBySite
        ) {
            $indices['site'] = 'idSite';
        }

        if (count($this->params->getPeriods()) > 1
            || $this->forceIndexedByDate
        ) {
            $indices['period'] = 'date';
        }

        return $indices;
    }
1258874
public function getAllIndexes()
    {
        if (empty($this->indexes)) {
            $indexes = FullTextSearch::get_indexes();
            $this->indexes = array_keys($indexes);
        }
        return $this->indexes;
    }
419480
Map<UUID, CacheBucketOffset> getTailHashes(long segmentId) {
        return forSegmentCache(segmentId, SegmentKeyCache::getTailBucketOffsets, Collections.emptyMap());
    }
578537
public function getCacheHits()
    {
        return array_reduce(iterator_to_array($this->getCommands()), function ($hits, $value) {
            $hits += $value['cache'];

            return $hits;
        });
    }
295112
private function getDynamicRouteIds(array $segments): array
    {
        $matched = [];
        $index = 0;

        do {
            $matched[] =
                $this->provider->getRoutesBySegmentValue($index, $segments[$index]) +
                $this->provider->getRoutesBySegmentValue($index, RouteDefinition::DYNAMIC_SEGMENT);
            $index++;
        } while (isset($segments[$index]));

        $matched[] = $this->provider->getRoutesBySegmentCount(\count($segments));

        return array_values(array_intersect_key(... $matched));
    }
430636
public function getKeys() {
        $keys = [];
        foreach($this->arrays as $array) {
            $keys = array_merge($keys, $array instanceof \ArrayAccess ? $array->getKeys():array_keys($array));
        }
        return array_unique($keys);
    }
565034
public function hasHistoricalEntries() {
        return 0 < (new CmsCategoryQuery)->whereCmsCategoryOriginalId()->equals($this->cmsCategoryOriginalId ? $this->cmsCategoryOriginalId : $this->id)
                ->andFieldStatus()->equals(self::STATUS_HISTORY)
                ->count();
    }
359852
public function getPasswordHashRules()
    {
        if (!is_string($this->passwordHashAttribute) || empty($this->passwordHashAttribute)) {
            return [];
        }
        if (empty($this->passwordHashRules) || !is_array($this->passwordHashRules)) {
            $this->passwordHashRules = [
                [[$this->passwordHashAttribute], 'string', 'max' => $this->passwordHashAttributeLength],
            ];
        }
        return $this->passwordHashRules;
    }
1239872
public function getHashContents()
    {
        if (is_array($this->_hashContents)) return $this->_hashContents;
        $this->_hashContents = array();
        if(!isset($this->_packageXml->contents->target)) {
            return $this->_hashContents;
        }
        foreach($this->_packageXml->contents->target as $target) {
            $targetUri = $this->getTarget()->getTargetUri($target['name']);
            $this->_getHashList($target, $targetUri);
        }
        return $this->_hashContents;
    }