skip() public method

Map to nth record relative to current cursor position
public skip ( $ofs = 1 ) : mixed
$ofs int
return mixed
Beispiel #1
0
 public function skip($ofs = 1)
 {
     $this->reset(false);
     if ($this->mapper->skip($ofs)) {
         return $this;
     } else {
         $this->reset(false);
     }
 }
Beispiel #2
0
 /**
 		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;
 }
Beispiel #3
0
 /**
 		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;
 }
Beispiel #4
0
 /**
  *	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;
 }
Beispiel #5
0
 /**
  *	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;
 }