Inheritance diagram for DbaReader:


Public Member Functions | |
| __construct ($file, $handler) | |
| __destruct () | |
| current () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Protected Attributes | |
| $db = NULL | |
Private Member Functions | |
| fetch_data () | |
Private Attributes | |
| $key = false | |
| $val = false | |
Definition at line 17 of file dbareader.inc.
| DbaReader::__construct | ( | $ | file, | |
| $ | handler | |||
| ) |
Open database $file with $handler in read only mode.
| file | Database file to open. | |
| handler | Handler to use for database access. |
Reimplemented in DbaArray.
Definition at line 30 of file dbareader.inc.
00030 { 00031 if (!$this->db = dba_open($file, 'r', $handler)) { 00032 throw new exception('Could not open file ' . $file); 00033 } 00034 }
| DbaReader::__destruct | ( | ) |
| DbaReader::current | ( | ) |
| DbaReader::fetch_data | ( | ) | [private] |
| DbaReader::key | ( | ) |
Implements Iterator.
Definition at line 91 of file dbareader.inc.
Referenced by fetch_data(), next(), rewind(), and valid().
00091 { 00092 return $this->key; 00093 }
| DbaReader::next | ( | ) |
Move to next element.
Implements Iterator.
Definition at line 56 of file dbareader.inc.
References fetch_data(), and key().
00056 { 00057 $this->key = dba_nextkey($this->db); 00058 $this->fetch_data(); 00059 }
Here is the call graph for this function:

| DbaReader::rewind | ( | ) |
Rewind to first element.
Implements Iterator.
Definition at line 46 of file dbareader.inc.
References fetch_data(), and key().
00046 { 00047 $this->key = dba_firstkey($this->db); 00048 $this->fetch_data(); 00049 }
Here is the call graph for this function:

| DbaReader::valid | ( | ) |
Implements Iterator.
Definition at line 80 of file dbareader.inc.
References key().
00080 { 00081 if ($this->db && $this->key !== false) { 00082 return true; 00083 } else { 00084 return false; 00085 } 00086 }
Here is the call graph for this function:

DbaReader::$db = NULL [protected] |
Definition at line 20 of file dbareader.inc.
DbaReader::$key = false [private] |
Definition at line 21 of file dbareader.inc.
DbaReader::$val = false [private] |
Definition at line 22 of file dbareader.inc.
1.5.2