Neos\Flow\Aop\Pointcut\PointcutSettingFilter::parseConfigurationOptionPath PHP Метод

parseConfigurationOptionPath() защищенный Метод

Parses the given configuration path expression and sets $this->actualSettingValue and $this->condition accordingly
protected parseConfigurationOptionPath ( string $settingComparisonExpression ) : void
$settingComparisonExpression string The configuration expression (path + optional condition)
Результат void
    protected function parseConfigurationOptionPath($settingComparisonExpression)
    {
        $settingComparisonExpression = preg_split(self::PATTERN_SPLITBYEQUALSIGN, $settingComparisonExpression);
        if (isset($settingComparisonExpression[1])) {
            $matches = [];
            preg_match(self::PATTERN_MATCHVALUEINQUOTES, $settingComparisonExpression[1], $matches);
            if (isset($matches['SingleQuotedString']) && $matches['SingleQuotedString'] !== '') {
                $this->condition = $matches['SingleQuotedString'];
            } elseif (isset($matches['DoubleQuotedString']) && $matches['DoubleQuotedString'] !== '') {
                $this->condition = $matches['DoubleQuotedString'];
            } else {
                throw new InvalidPointcutExpressionException('The given condition has a syntax error (Make sure to set quotes correctly). Got: "' . $settingComparisonExpression[1] . '"', 1230047529);
            }
        }
        $configurationKeys = preg_split('/\\./', $settingComparisonExpression[0]);
        if (count($configurationKeys) > 0) {
            $settingPackageKey = array_shift($configurationKeys);
            $settingValue = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $settingPackageKey);
            foreach ($configurationKeys as $currentKey) {
                if (!isset($settingValue[$currentKey])) {
                    throw new InvalidPointcutExpressionException('The given configuration path in the pointcut designator "setting" did not exist. Got: "' . $settingComparisonExpression[0] . '"', 1230035614);
                }
                $settingValue = $settingValue[$currentKey];
            }
            $this->actualSettingValue = $settingValue;
        }
    }