/** * (non-PHPdoc) * @see Bgtask_Storage::isLive() */ public function isLive($pid) { if ($this->_objectModel->getCount(array('id' => $pid))) { return true; } return false; }
/** * Return a count of records. If a certain method exists, use it. * * @param Model $model * @return array */ public function getRecordCount(Model $model) { if ($model->hasMethod('getCount')) { return $model->getCount(); } return $model->find('count'); }