<?php
 namespace MongoDB\Model;
 use function current;
 use function key;
 use function next;
 use function reset;
 class DatabaseInfoLegacyIterator implements DatabaseInfoIterator {
 private $databases;
 public function __construct(array $databases) {
 $this->databases = $databases;
 }
 public function current() {
 return new DatabaseInfo(current($this->databases));
 }
 public function key() {
 return key($this->databases);
 }
 public function next() {
 next($this->databases);
 }
 public function rewind() {
 reset($this->databases);
 }
 public function valid() {
 return key($this->databases) !== null;
 }
 }
 