31 if (!$this->db = dba_open($file,
'r', $handler)) {
32 throw new exception(
'Could not open file ' . $file);
47 $this->
key = dba_firstkey($this->db);
57 $this->
key = dba_nextkey($this->db);
65 if ($this->
key !==
false) {
66 $this->val = dba_fetch($this->
key, $this->db);
81 if ($this->db && $this->
key !==
false) {
__destruct()
Close database.
__construct($file, $handler)
Open database $file with $handler in read only mode.
next()
Move to next element.
This implements a DBA Iterator.
fetch_data()
Fetches the current data if $key is valid.
rewind()
Rewind to first element.