public function updateCounters($counters) { if (static::updateAllCounters($counters, $this->getOldPrimaryKey(true)) > 0) { foreach ($counters as $name => $value) { if (!isset($this->_attributes[$name])) { $this->_attributes[$name] = $value; } else { $this->_attributes[$name] += $value; } $this->_oldAttributes[$name] = $this->_attributes[$name]; } return true; } else { return false; } }