eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver::hasParameter PHP Метод

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
    public function hasParameter($paramName, $namespace = null, $scope = null)
    {
        $namespace = $namespace ?: $this->defaultNamespace;
        $scope = $scope ?: $this->defaultScope;
        $defaultScopeParamName = "{$namespace}." . self::SCOPE_DEFAULT . ".{$paramName}";
        $globalScopeParamName = "{$namespace}." . self::SCOPE_GLOBAL . ".{$paramName}";
        $relativeScopeParamName = "{$namespace}.{$scope}.{$paramName}";
        // Relative scope, siteaccess group wise
        $groupScopeHasParam = false;
        if (isset($this->groupsBySiteAccess[$scope])) {
            foreach ($this->groupsBySiteAccess[$scope] as $groupName) {
                $groupScopeParamName = "{$namespace}.{$groupName}.{$paramName}";
                if ($this->container->hasParameter($groupScopeParamName)) {
                    $groupScopeHasParam = true;
                    break;
                }
            }
        }
        return $this->container->hasParameter($defaultScopeParamName) || $groupScopeHasParam || $this->container->hasParameter($relativeScopeParamName) || $this->container->hasParameter($globalScopeParamName);
    }