Neos\Fusion\Core\Cache\ContentCache::serializeContext PHP Метод

serializeContext() защищенный Метод

Generates an array of strings from the given array of context variables
protected serializeContext ( array $contextVariables ) : array
$contextVariables array
Результат array
    protected function serializeContext(array $contextVariables)
    {
        $serializedContextArray = [];
        foreach ($contextVariables as $variableName => $contextValue) {
            // TODO This relies on a converter being available from the context value type to string
            if ($contextValue !== null) {
                $serializedContextArray[$variableName]['type'] = $this->getTypeForContextValue($contextValue);
                $serializedContextArray[$variableName]['value'] = $this->propertyMapper->convert($contextValue, 'string');
            }
        }
        return $serializedContextArray;
    }