Neos\ContentRepository\Domain\Service\ContextFactory::getIdentifierSource PHP Method

getIdentifierSource() protected method

This creates the actual identifier and needs to be overridden by builders extending this.
protected getIdentifierSource ( array $contextProperties ) : string
$contextProperties array
return string
    protected function getIdentifierSource(array $contextProperties)
    {
        ksort($contextProperties);
        $identifierSource = $this->contextImplementation;
        foreach ($contextProperties as $propertyName => $propertyValue) {
            if ($propertyName === 'dimensions') {
                $stringParts = array();
                foreach ($propertyValue as $dimensionName => $dimensionValues) {
                    $stringParts[] = $dimensionName . '=' . implode(',', $dimensionValues);
                }
                $stringValue = implode('&', $stringParts);
            } elseif ($propertyName === 'targetDimensions') {
                $stringParts = array();
                foreach ($propertyValue as $dimensionName => $dimensionValue) {
                    $stringParts[] = $dimensionName . '=' . $dimensionValue;
                }
                $stringValue = implode('&', $stringParts);
            } else {
                $stringValue = $propertyValue instanceof \DateTimeInterface ? $propertyValue->getTimestamp() : (string) $propertyValue;
            }
            $identifierSource .= ':' . $stringValue;
        }
        return $identifierSource;
    }