public function skip($ofs = 1) { $this->reset(false); if ($this->mapper->skip($ofs)) { return $this; } else { $this->reset(false); } }
/** Return record at specified offset using criteria of previous load() call and make it active @return array @param $ofs int **/ function skip($ofs = 1) { $this->document = ($out = parent::skip($ofs)) ? $out->document : array(); $this->id = $out ? $out->id : NULL; return $out; }
/** Return record at specified offset using same criteria as previous load() call and make it active @return array @param $ofs int **/ function skip($ofs = 1) { if ($out = parent::skip($ofs)) { foreach ($this->fields as $key => &$field) { $field['value'] = $out->fields[$key]['value']; $field['changed'] = FALSE; if ($field['pkey']) { $field['previous'] = $out->fields[$key]['value']; } unset($field); } foreach ($this->adhoc as $key => &$field) { $field['value'] = $out->adhoc[$key]['value']; unset($field); } } return $out; }
/** * Return record at specified offset using same criteria as * previous load() call and make it active * @return array * @param $ofs int **/ function skip($ofs = 1) { $out = parent::skip($ofs); $dry = $this->dry(); foreach ($this->fields as $key => &$field) { $field['value'] = $dry ? NULL : $out->fields[$key]['value']; $field['changed'] = FALSE; if ($field['pkey']) { $field['previous'] = $dry ? NULL : $out->fields[$key]['value']; } unset($field); } foreach ($this->adhoc as $key => &$field) { $field['value'] = $dry ? NULL : $out->adhoc[$key]['value']; unset($field); } if (isset($this->trigger['load'])) { \Base::instance()->call($this->trigger['load'], $this); } return $out; }
/** * Return record at specified offset using criteria of previous * load() call and make it active * @return array * @param $ofs int **/ function skip($ofs = 1) { $this->document = ($out = parent::skip($ofs)) ? $out->document : array(); $this->id = $out ? $out->id : NULL; if ($this->document && isset($this->trigger['load'])) { \Base::instance()->call($this->trigger['load'], $this); } return $out; }