src/League/Monga/Cursor.php
public function toRefArray()
    {
        // Retrieve the actual objects.
        $documents = $this->toArray();

        // Get the collection idenfitier
        $collection = (string) $this->collection->getCollection();

        foreach ($documents as &$document) {
            $document = MongoDBRef::create($collection, $document);
        }

        return $documents;
    }
public function toRefArray()
    {
        // Retrieve the actual objects.
        $documents = $this->toArray();

        // Get the collection idenfitier
        $collection = (string) $this->collection->getCollection();

        foreach ($documents as &$document) {
            $document = MongoDBRef::create($collection, $document);
        }

        return $documents;
    }
public function toRefArray ( ) { // Retrieve the actual objects. $ documents = $ this -> toArray ( ) ; // Get the collection idenfitier $ collection = ( string ) $ this -> collection -> getCollection ( ) ; foreach ( $ documents as & $ document ) { $ document = MongoDBRef :: create ( $ collection , $ document ) ; } return $ documents ; }
Return the result content as MongoDBREf objects.

@return array array of mongo references
Return the result content as MongoDBREf objects .