Interface

eZ\Publish\Core\MVC\ConfigResolverInterface

interface ConfigResolverInterface

Interface for config resolvers.

Classes implementing this interface will help you get settings for a specific scope. In eZ Publish context, this is useful to get a setting for a specific siteaccess for example.

The idea is to check the different scopes available for a given namespace to find the appropriate parameter. To work, the dynamic setting must comply internally to the following name format : "..parameter.name".

Methods

mixed getParameter(string $paramName, string $namespace = null, string $scope = null)

Returns value for $paramName, in $namespace.

bool hasParameter(string $paramName, string $namespace = null, string $scope = null)

Checks if $paramName exists in $namespace.

setDefaultNamespace(string $defaultNamespace)

Changes the default namespace to look parameter into.

string getDefaultNamespace()

Returns the current default namespace.

Details

at line 31
public mixed getParameter(string $paramName, string $namespace = null, string $scope = null)

Returns value for $paramName, in $namespace.

Parameters

string $paramName The parameter name, without $prefix and the current scope (i.e. siteaccess name).
string $namespace Namespace for the parameter name. If null, the default namespace should be used.
string $scope The scope you need $paramName value for.

Return Value

mixed

at line 42
public bool hasParameter(string $paramName, string $namespace = null, string $scope = null)

Checks if $paramName exists in $namespace.

Parameters

string $paramName
string $namespace If null, the default namespace should be used.
string $scope The scope you need $paramName value for.

Return Value

bool

at line 49
public setDefaultNamespace(string $defaultNamespace)

Changes the default namespace to look parameter into.

Parameters

string $defaultNamespace

at line 56
public string getDefaultNamespace()

Returns the current default namespace.

Return Value

string