Jackalope\Transport\Jackrabbit\Client::getNodes PHP Method

getNodes() public method

{@inheritDoc}
public getNodes ( $paths, $query = ':include' )
    public function getNodes($paths, $query = ':include')
    {
        if (count($paths) == 0) {
            return array();
        }
        if (count($paths) == 1) {
            $url = array_shift($paths);
            try {
                return array($url => $this->getNode($url));
            } catch (ItemNotFoundException $e) {
                return array();
            }
        }
        $body = array();
        $url = '/.' . $this->getFetchDepth() . '.json';
        foreach ($paths as $path) {
            $body[] = http_build_query(array($query => $path));
        }
        $body = implode('&', $body);
        $request = $this->getRequest(Request::POST, $url);
        $request->setBody($body);
        $request->setContentType('application/x-www-form-urlencoded; charset=utf-8');
        try {
            $data = $request->executeJson();
            return (array) $data->nodes;
        } catch (PathNotFoundException $e) {
            throw new ItemNotFoundException($e->getMessage(), $e->getCode(), $e);
        }
    }