public function getAllIds($collection)
    {
        $params   = [
            self::OPTION_COLLECTION => $this->makeCollection($collection)
        ];
        $response = $this->getConnection()->put(Urls::URL_ALL_KEYS, $this->json_encode_wrapper($params));

        $data = $response->getJson();
        if (!isset($data[Cursor::ENTRY_RESULT])) {
            throw new ClientException('Got an invalid document list from the server');
        }

        $cursor = new Cursor($this->getConnection(), $response->getJson(), ['_documentClass' => $this->_documentClass]);
        $ids    = [];
        foreach ($cursor->getAll() as $location) {
            $ids[] = UrlHelper::getDocumentIdFromLocation($location);
        }

        return $ids;
    }
public function getAllIds($collection)
    {
        $params   = [
            self::OPTION_COLLECTION => $this->makeCollection($collection)
        ];
        $response = $this->getConnection()->put(Urls::URL_ALL_KEYS, $this->json_encode_wrapper($params));

        $data = $response->getJson();
        if (!isset($data[Cursor::ENTRY_RESULT])) {
            throw new ClientException('Got an invalid document list from the server');
        }

        $cursor = new Cursor($this->getConnection(), $response->getJson(), ['_documentClass' => $this->_documentClass]);
        $ids    = [];
        foreach ($cursor->getAll() as $location) {
            $ids[] = UrlHelper::getDocumentIdFromLocation($location);
        }

        return $ids;
    }
public function getAllIds ( $ collection ) { $ params = [ self :: OPTION_COLLECTION => $ this -> makeCollection ( $ collection ) ] ; $ response = $ this -> getConnection ( ) -> put ( Urls :: URL_ALL_KEYS , $ this -> json_encode_wrapper ( $ params ) ) ; $ data = $ response -> getJson ( ) ; if ( ! isset ( $ data [ Cursor :: ENTRY_RESULT ] ) ) { throw new ClientException ( 'Got an invalid document list from the server' ) ; } $ cursor = new Cursor ( $ this -> getConnection ( ) , $ response -> getJson ( ) , [ '_documentClass' => $ this -> _documentClass ] ) ; $ ids = [ ] ; foreach ( $ cursor -> getAll ( ) as $ location ) { $ ids [ ] = UrlHelper :: getDocumentIdFromLocation ( $ location ) ; } return $ ids ; }
Get the list of all documents' ids from a collection

This will throw if the list cannot be fetched from the server

@throws Exception

@param mixed $collection - collection id as string or number

@return array - ids of documents in the collection
Get the list of all documents ids from a collection