Firestore/src/DocumentReference.php
public function collections(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);
        return new ItemIterator(
            new PageIterator(
                function ($collectionId) {
                    return new CollectionReference(
                        $this->connection,
                        $this->valueMapper,
                        $this->childPath($this->name, $collectionId)
                    );
                },
                [$this->connection, 'listCollectionIds'],
                $options + ['parent' => $this->name],
                [
                    'itemsKey' => 'collectionIds',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function collections(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);
        return new ItemIterator(
            new PageIterator(
                function ($collectionId) {
                    return new CollectionReference(
                        $this->connection,
                        $this->valueMapper,
                        $this->childPath($this->name, $collectionId)
                    );
                },
                [$this->connection, 'listCollectionIds'],
                $options + ['parent' => $this->name],
                [
                    'itemsKey' => 'collectionIds',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function collections ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( $ collectionId ) { return new CollectionReference ( $ this -> connection , $ this -> valueMapper , $ this -> childPath ( $ this -> name , $ collectionId ) ) ; } , [ $ this -> connection , 'listCollectionIds' ] , $ options + [ 'parent' => $ this -> name ] , [ 'itemsKey' => 'collectionIds' , 'resultLimit' => $ resultLimit ] ) ) ; }
List all collections which are children of the current document.

Example:
```
$collections = $document->collections();
```

@codingStandardsIgnoreStart
https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1beta1#google.firestore.v1beta1.Firestore.ListCollectionIds ListCollectionIds
@codingStandardsIgnoreEnd

@param array $options Configuration options.
@return ItemIterator<CollectionReference>
List all collections which are children of the current document .