<?php private function selectSimpleRowset(SearchCriteria_Interface $sc, DataAccess_Interface $da, $func = 'selectRowset') { $sql = ''; $this->beginProfiling(); try { $result = $da->$func($this->_db, $sc, $sql); $this->endProfiling(); return $result; } catch (Exception $e) { $this->_logger->log_debug($e); // finallyがないのでこんなことをする $this->endProfiling($sql); throw $e; } } public function selectBookDataRowSet() { $da = new daBookData; $sc = $da::createCriteria(); $sc->setName('うららちゃんのナカの人'); return $this->selectSimpleRowSet($sc, $da); } public function selectReleaseDailyListRowSet() { $da = new daBookData; $sc = $da::createCriteria(); $sc->setReleaseMonth('2012-03-01'); return $this->selectSimpleRowSet($sc, $da, 'makeReleaseDailyList'); }
う〜ん、イマイチ。