ElasticSearch\Transport\Base::buildUrl PHP Метод

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

Build a callable url
protected buildUrl ( array | boolean $path = false, array $options = [] ) : string
$path array | boolean
$options array Query parameter options to pass
Результат string
    protected function buildUrl($path = false, array $options = array())
    {
        $isAbsolute = (is_array($path) ? $path[0][0] : $path[0]) === '/';
        $url = $isAbsolute ? '' : "/" . $this->index;
        if ($path && is_array($path) && count($path) > 0) {
            $url .= "/" . implode("/", array_filter($path));
        }
        if (substr($url, -1) == "/") {
            $url = substr($url, 0, -1);
        }
        if (count($options) > 0) {
            $url .= "?" . http_build_query($options, '', '&');
        }
        return $url;
    }