LdapTools\Resolver\ParameterResolver::getParametersInValue PHP Method

getParametersInValue() protected static method

Given an attribute value get all parameters it expects.
protected static getParametersInValue ( string | array $value ) : array
$value string | array
return array
    protected static function getParametersInValue($value)
    {
        $parameters = [];
        $regex = '/' . self::PARAM_MARKER . '(.*?)' . self::PARAM_MARKER . '/';
        $value = is_array($value) ? $value : [$value];
        foreach ($value as $attrValue) {
            if (is_string($attrValue) && preg_match_all($regex, $attrValue, $matches) && isset($matches[1])) {
                $parameters = array_merge($parameters, $matches[1]);
            }
        }
        return $parameters;
    }