reset() public method

Reset cursor
public reset ( ) : null
return null
コード例 #1
0
ファイル: cortex.php プロジェクト: binarygeotech/burgers
 /**
  * reset and re-initialize the mapper
  * @param bool $mapper
  * @return NULL|void
  */
 public function reset($mapper = true)
 {
     if ($mapper) {
         $this->mapper->reset();
     }
     $this->fieldsCache = array();
     $this->saveCsd = array();
     // set default values
     if (($this->dbsType == 'jig' || $this->dbsType == 'mongo') && !empty($this->fieldConf)) {
         foreach ($this->fieldConf as $field_key => $field_conf) {
             if (array_key_exists('default', $field_conf)) {
                 $val = $field_conf['default'] === \DB\SQL\Schema::DF_CURRENT_TIMESTAMP ? date('Y-m-d H:i:s') : $field_conf['default'];
                 $this->set($field_key, $val);
             }
         }
     }
 }
コード例 #2
0
ファイル: mapper.php プロジェクト: TomGB/f3-crud
 /**
 		Reset cursor
 		@return NULL
 	**/
 function reset()
 {
     $this->id = NULL;
     $this->document = array();
     parent::reset();
 }
コード例 #3
0
ファイル: mapper.php プロジェクト: adentes-org/preums
 /**
 		Reset cursor
 		@return NULL
 	**/
 function reset()
 {
     foreach ($this->fields as &$field) {
         $field['value'] = NULL;
         $field['changed'] = FALSE;
         if ($field['pkey']) {
             $field['previous'] = NULL;
         }
         unset($field);
     }
     foreach ($this->adhoc as &$field) {
         $field['value'] = NULL;
         unset($field);
     }
     parent::reset();
 }
コード例 #4
0
ファイル: mapper.php プロジェクト: nanawel/fatfree-core
 /**
  *	Reset cursor
  *	@return NULL
  **/
 function reset()
 {
     $this->document = [];
     parent::reset();
 }