SwatDB/SwatDBRecordsetWrapper.php
public function offsetUnset($offset)
    {
        if (isset($this[$offset])) {
            if ($this->index_field === null) {
                $this->removed_objects[] = $this->objects[$offset];
                unset($this->objects[$offset]);

                // update iterator index
                if (
                    $this->current_index >= $offset &&
                    $this->current_index > 0
                ) {
                    $this->current_index--;
                }
            } else {
                $object = $this->objects_by_index[$offset];
                $this->removed_objects[] = $object;
                unset($this->objects_by_index[$offset]);

                $keys = array_keys($this->objects, $object, true);
                foreach ($keys as $key) {
                    unset($this->objects[$key]);

                    // update iterator index
                    if (
                        $this->current_index >= $key &&
                        $this->current_index > 0
                    ) {
                        $this->current_index--;
                    }
                }
            }

            // reindex ordinal array of records
            $this->objects = array_values($this->objects);
        }
    }
public function offsetUnset($offset)
    {
        if (isset($this[$offset])) {
            if ($this->index_field === null) {
                $this->removed_objects[] = $this->objects[$offset];
                unset($this->objects[$offset]);

                // update iterator index
                if (
                    $this->current_index >= $offset &&
                    $this->current_index > 0
                ) {
                    $this->current_index--;
                }
            } else {
                $object = $this->objects_by_index[$offset];
                $this->removed_objects[] = $object;
                unset($this->objects_by_index[$offset]);

                $keys = array_keys($this->objects, $object, true);
                foreach ($keys as $key) {
                    unset($this->objects[$key]);

                    // update iterator index
                    if (
                        $this->current_index >= $key &&
                        $this->current_index > 0
                    ) {
                        $this->current_index--;
                    }
                }
            }

            // reindex ordinal array of records
            $this->objects = array_values($this->objects);
        }
    }
public function offsetUnset ( $ offset ) { if ( isset ( $ this [ $ offset ] ) ) { if ( $ this -> index_field === null ) { $ this -> removed_objects [ ] = $ this -> objects [ $ offset ] ; unset ( $ this -> objects [ $ offset ] ) ; // update iterator index if ( $ this -> current_index >= $ offset && $ this -> current_index > 0 ) { $ this -> current_index -- ; } } else { $ object = $ this -> objects_by_index [ $ offset ] ; $ this -> removed_objects [ ] = $ object ; unset ( $ this -> objects_by_index [ $ offset ] ) ; $ keys = array_keys ( $ this -> objects , $ object , true ) ; foreach ( $ keys as $ key ) { unset ( $ this -> objects [ $ key ] ) ; // update iterator index if ( $ this -> current_index >= $ key && $ this -> current_index > 0 ) { $ this -> current_index -- ; } } } // reindex ordinal array of records $ this -> objects = array_values ( $ this -> objects ) ; } }
Unsets a record in this recordset at the specified offset

This removes the record at the specified offset from this recordset.
If no such record exists, nothing is done. The record object itself
still exists if there is an external reference to it elsewhere.

@param mixed $offset the offset for which to unset the record. If this
recordset has a defined index field, the offset is
an index value. Otherwise, the offset is an
ordinal value.
Unsets a record in this recordset at the specified offset