public function incrKey($collection, $key, $by = 1) { $current = $this->getKey($collection, $key, 0); $newone = $current + $by; $this->setKey($collection, $key, $newone); return $newone; }