/** * reloads the elements of the collection * by calling the finder function * * @return number of records after refresh */ function refresh() { if (is_callable($this->finder)) { $data = call_user_func($this->finder); $this->exchangeArray($data); $this->deleted->exchangeArray(array()); return $this->last_count = $this->count(); } }