| @@ 216-244 (lines=29) @@ | ||
| 213 | ||
| 214 | ||
| 215 | ||
| 216 | class absences_OrganizationIterator extends absences_Iterator |
|
| 217 | { |
|
| 218 | public function getObject($data) |
|
| 219 | { |
|
| 220 | $org = new absences_Organization; |
|
| 221 | $org->setRow($data); |
|
| 222 | ||
| 223 | ||
| 224 | return $org; |
|
| 225 | } |
|
| 226 | ||
| 227 | public function executeQuery() |
|
| 228 | { |
|
| 229 | if(is_null($this->_oResult)) |
|
| 230 | { |
|
| 231 | global $babDB; |
|
| 232 | ||
| 233 | $query = ' |
|
| 234 | SELECT |
|
| 235 | o.* |
|
| 236 | FROM |
|
| 237 | absences_organization o |
|
| 238 | '; |
|
| 239 | ||
| 240 | $this->setMySqlResult($this->getDataBaseAdapter()->db_query($query)); |
|
| 241 | } |
|
| 242 | } |
|
| 243 | ||
| 244 | } |
|
| @@ 91-112 (lines=22) @@ | ||
| 88 | ||
| 89 | ||
| 90 | ||
| 91 | class absences_WorkperiodTypeIterator extends absences_Iterator |
|
| 92 | { |
|
| 93 | ||
| 94 | ||
| 95 | public function getObject($data) |
|
| 96 | { |
|
| 97 | $type = new absences_WorkperiodType; |
|
| 98 | $type->setRow($data); |
|
| 99 | ||
| 100 | return $type; |
|
| 101 | } |
|
| 102 | ||
| 103 | public function executeQuery() |
|
| 104 | { |
|
| 105 | if(is_null($this->_oResult)) |
|
| 106 | { |
|
| 107 | $query = 'SELECT * FROM absences_workperiod_type ORDER BY name'; |
|
| 108 | $this->setMySqlResult($this->getDataBaseAdapter()->db_query($query)); |
|
| 109 | } |
|
| 110 | } |
|
| 111 | ||
| 112 | } |
|