PHP 클래스 eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver

This is useful to get a setting for a specific siteaccess for example. It will 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". - is the namespace for your dynamic setting. Defaults to "ezsettings", but can be anything. - is basically the siteaccess name you want your parameter value to apply to. Can also be "global" for a global override. Another scope is used internally: "default". This is the generic fallback. The resolve scope order is the following: 1. "global" 2. SiteAccess name 3. "default"
상속: implements eZ\Publish\Core\MVC\Symfony\Configuration\VersatileScopeInterface, implements eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessAware, implements Symfony\Component\DependencyInjection\ContainerAwareInterface, use trait Symfony\Component\DependencyInjection\ContainerAwareTrait
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$defaultNamespace string
$defaultScope string
$groupsBySiteAccess Siteaccess groups, indexed by siteaccess name
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess
$undefinedStrategy integer

공개 메소드들

메소드 설명
__construct ( array $groupsBySiteAccess, string $defaultNamespace, integer $undefinedStrategy = self::UNDEFINED_STRATEGY_EXCEPTION )
getDefaultNamespace ( ) : string
getDefaultScope ( )
getParameter ( string $paramName, string $namespace = null, string $scope = null ) : mixed Returns value for $paramName, in $namespace.
getUndefinedStrategy ( ) : integer
hasParameter ( string $paramName, string $namespace = null, string $scope = null ) : boolean Checks if $paramName exists in $namespace.
setDefaultNamespace ( string $defaultNamespace ) Changes the default namespace to look parameter into.
setDefaultScope ( $scope )
setSiteAccess ( SiteAccess $siteAccess = null )
setUndefinedStrategy ( integer $undefinedStrategy ) Sets the strategy to use if an undefined parameter is being asked.

메소드 상세

__construct() 공개 메소드

public __construct ( array $groupsBySiteAccess, string $defaultNamespace, integer $undefinedStrategy = self::UNDEFINED_STRATEGY_EXCEPTION )
$groupsBySiteAccess array SiteAccess groups, indexed by siteaccess.
$defaultNamespace string The default namespace
$undefinedStrategy integer Strategy to use when encountering undefined parameters. Must be one of - ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION (throw an exception) - ConfigResolver::UNDEFINED_STRATEGY_NULL (return null)

getDefaultNamespace() 공개 메소드

public getDefaultNamespace ( ) : string
리턴 string

getDefaultScope() 공개 메소드

public getDefaultScope ( )

getParameter() 공개 메소드

Returns value for $paramName, in $namespace.
public getParameter ( string $paramName, string $namespace = null, string $scope = null ) : mixed
$paramName string The parameter name, without $prefix and the current scope (i.e. siteaccess name).
$namespace string Namespace for the parameter name. If null, the default namespace will be used.
$scope string The scope you need $paramName value for. It's typically the siteaccess name. If null, the current siteaccess name will be used.
리턴 mixed

getUndefinedStrategy() 공개 메소드

public getUndefinedStrategy ( ) : integer
리턴 integer

hasParameter() 공개 메소드

Checks if $paramName exists in $namespace.
public hasParameter ( string $paramName, string $namespace = null, string $scope = null ) : boolean
$paramName string
$namespace string If null, the default namespace should be used.
$scope string The scope you need $paramName value for. It's typically the siteaccess name. If null, the current siteaccess name will be used.
리턴 boolean

setDefaultNamespace() 공개 메소드

Changes the default namespace to look parameter into.
public setDefaultNamespace ( string $defaultNamespace )
$defaultNamespace string

setDefaultScope() 공개 메소드

public setDefaultScope ( $scope )

setSiteAccess() 공개 메소드

public setSiteAccess ( SiteAccess $siteAccess = null )
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess

setUndefinedStrategy() 공개 메소드

Can be one of: - ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION (throw an exception) - ConfigResolver::UNDEFINED_STRATEGY_NULL (return null). Defaults to ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION.
public setUndefinedStrategy ( integer $undefinedStrategy )
$undefinedStrategy integer

프로퍼티 상세

$defaultNamespace 보호되어 있는 프로퍼티

protected string $defaultNamespace
리턴 string

$defaultScope 보호되어 있는 프로퍼티

protected string $defaultScope
리턴 string

$groupsBySiteAccess 보호되어 있는 프로퍼티

Siteaccess groups, indexed by siteaccess name
protected $groupsBySiteAccess

$siteAccess 보호되어 있는 프로퍼티

protected SiteAccess,eZ\Publish\Core\MVC\Symfony $siteAccess
리턴 eZ\Publish\Core\MVC\Symfony\SiteAccess

$undefinedStrategy 보호되어 있는 프로퍼티

protected int $undefinedStrategy
리턴 integer