public function getNotProcessedCount() { $db = RM_Entity::getDb(); /* @var Zend_Db_Select $select */ $select = Application_Model_Medical_Advice::_getSelect(); $select->where('isProcessed = 0'); $select->columns(array('COUNT(*) as notProcessedCount')); if ($result = $db->fetchRow($select)) { return (int) $result->notProcessedCount; } else { return 0; } }
public function __refreshCache() { parent::__refreshCache(); self::getCacher()->cache($this->getValue(), $this->getOptionKey()); }
/** * @param RM_Entity_Search_Autocomplete_Result|RM_Entity $item * @return array */ protected function __serializeItem($item) { return $item->__toArray(); }
protected function __cache() { parent::__cache(); $this->__cacheEntity(join('_', array(self::prepareStringForCache($this->getLatLng()->getLat()), self::prepareStringForCache($this->getLatLng()->getLng()), $this->getType()))); }