Doctrine\ODM\CouchDB\UnitOfWork::findMany PHP Method

findMany() public method

Important: Each document is returned with the key it has in the $ids array!
public findMany ( array $ids, null | string $documentName = null, null | integer $limit = null, null | integer $offset = null ) : array
$ids array
$documentName null | string
$limit null | integer
$offset null | integer
return array
    public function findMany(array $ids, $documentName = null, $limit = null, $offset = null)
    {
        $response = $this->dm->getCouchDBClient()->findDocuments($ids, $limit, $offset);
        $keys = array_flip($ids);
        if ($response->status != 200) {
            throw new \Exception("loadMany error code " . $response->status);
        }
        $docs = array();
        foreach ($response->body['rows'] as $responseData) {
            if (isset($responseData['doc'])) {
                $docs[$keys[$responseData['id']]] = $this->createDocument($documentName, $responseData['doc']);
            }
        }
        return $docs;
    }