private function createExpression(array $dynamicSetting)
    {
        $expression = sprintf(
            'service("ezpublish.config.resolver").getParameter("%s", %s, %s)',
            $dynamicSetting['param'],
            isset($dynamicSetting['namespace']) ? '"' . $dynamicSetting['namespace'] . '"' : 'null',
            isset($dynamicSetting['scope']) ? '"' . $dynamicSetting['scope'] . '"' : 'null'
        );

        return new Expression($expression);
    }