PHP Интерфейс eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\DynamicSettingParserInterface

A dynamic setting is a string representation of a ConfigResolver::getParameter() call. It allows usage of the ConfigResolver from e.g. configuration files. Supported syntax for dynamic settings: $[;[;]]$ The following will work : $my_param$ (using default namespace, e.g. ezsettings, with current scope). $my_param;foo$ (using "foo" as namespace, in current scope). $my_param;foo;some_siteaccess$ (using "foo" as namespace, forcing "some_siteaccess scope"). $my_param$ is the equivalent of $configResolver->getParameter( 'my_param' ); $my_param;foo$ is the equivalent of $configResolver->getParameter( 'my_param', 'foo' ); $my_param;foo;some_siteaccess$ is the equivalent of $configResolver->getParameter( 'my_param', 'foo', 'some_siteaccess' );
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
isDynamicSetting ( string $setting ) : boolean Checks if $setting is considered to be dynamic.
parseDynamicSetting ( string $setting ) : array Parses $setting and returns a hash of corresponding arguments.

Описание методов

isDynamicSetting() публичный Метод

i.e. if $setting follows the expected format.
public isDynamicSetting ( string $setting ) : boolean
$setting string
Результат boolean

parseDynamicSetting() публичный Метод

Returned hash will contain the following entries:. - "param": the parameter name (e.g. "my_param"). - "namespace": the namespace. Will be null if none was specified (considered default). - "scope": the scope. Will be null if none was specified (considered default).
public parseDynamicSetting ( string $setting ) : array
$setting string
Результат array