public function getDatabases(): array
    {
        $result = [];

        //Include manually added databases
        foreach ($this->config->databaseNames() as $name) {
            $result[] = $this->database($name);
        }

        return $result;
    }
public function getDatabases(): array
    {
        $result = [];

        //Include manually added databases
        foreach ($this->config->databaseNames() as $name) {
            $result[] = $this->database($name);
        }

        return $result;
    }
public function getDatabases ( ) : array { $ result = [ ] ; //Include manually added databases foreach ( $ this -> config -> databaseNames ( ) as $ name ) { $ result [ ] = $ this -> database ( $ name ) ; } return $ result ; }
Get every know database.

@return MongoDatabase[]
Get every know database .