private function parsePipelineBucketsPath(\DOMXPath $xpath, \DOMNode $pipelineNode)
    {
        $bucketsPath = null;

        foreach ($xpath->query(self::PIPELINE_COMPLEX_BUCKETS_PATH, $pipelineNode) as $bucketsPathMappingNode) {
            $paramName = $bucketsPathMappingNode->getAttribute('paramName');
            $path      = $bucketsPathMappingNode->textContent;
            if (empty($paramName) || empty($path)) {
                continue;
            }
            $bucketsPath[$paramName] = $path;
        }

        if (empty($bucketsPath)) {
            foreach ($xpath->query(self::PIPELINE_SIMPLE_BUCKETS_PATH, $pipelineNode) as $bucketsPathNode) {
                $bucketsPath = $bucketsPathNode->nodeValue;
            }
        }

        return $bucketsPath;
    }
private function parsePipelineBucketsPath(\DOMXPath $xpath, \DOMNode $pipelineNode)
    {
        $bucketsPath = null;

        foreach ($xpath->query(self::PIPELINE_COMPLEX_BUCKETS_PATH, $pipelineNode) as $bucketsPathMappingNode) {
            $paramName = $bucketsPathMappingNode->getAttribute('paramName');
            $path      = $bucketsPathMappingNode->textContent;
            if (empty($paramName) || empty($path)) {
                continue;
            }
            $bucketsPath[$paramName] = $path;
        }

        if (empty($bucketsPath)) {
            foreach ($xpath->query(self::PIPELINE_SIMPLE_BUCKETS_PATH, $pipelineNode) as $bucketsPathNode) {
                $bucketsPath = $bucketsPathNode->nodeValue;
            }
        }

        return $bucketsPath;
    }
private function parsePipelineBucketsPath ( \ DOMXPath $ xpath , \ DOMNode $ pipelineNode ) { $ bucketsPath = null ; foreach ( $ xpath -> query ( self :: PIPELINE_COMPLEX_BUCKETS_PATH , $ pipelineNode ) as $ bucketsPathMappingNode ) { $ paramName = $ bucketsPathMappingNode -> getAttribute ( 'paramName' ) ; $ path = $ bucketsPathMappingNode -> textContent ; if ( empty ( $ paramName ) || empty ( $ path ) ) { continue ; } $ bucketsPath [ $ paramName ] = $ path ; } if ( empty ( $ bucketsPath ) ) { foreach ( $ xpath -> query ( self :: PIPELINE_SIMPLE_BUCKETS_PATH , $ pipelineNode ) as $ bucketsPathNode ) { $ bucketsPath = $ bucketsPathNode -> nodeValue ; } } return $ bucketsPath ; }
Parse the buckets path of a pipeline aggregation.

@param \DOMXPath $xpath        XPath access to the document parsed.
@param \DOMNode  $pipelineNode Pipeline aggregation node to be parsed for buckets path.

@return null|array|string
Parse the buckets path of a pipeline aggregation .