abstract class DataSource implements Iterator { public $source_name; public function __construct($source_name) { $this->source_name = $source_name; } // Returns the current data row abstract public function current(); // Returns a key for the current data row public function key() {} // Advances the current data; no return value abstract public function next(); // Resets the current data to the first value; no return value abstract public function rewind(); // Returns true if current() will return valid data abstract public function valid(); }