private function doRemove($offset, $arrayAccess)
    {
        $this->initialize();
        if ($arrayAccess) {
            $this->coll->offsetUnset($offset);
            $removed = true;
        } else {
            $removed = $this->coll->remove($offset);
        }

        if (! $removed && ! $arrayAccess) {
            return $removed;
        }

        $this->changed();

        return $removed;
    }
private function doRemove($offset, $arrayAccess)
    {
        $this->initialize();
        if ($arrayAccess) {
            $this->coll->offsetUnset($offset);
            $removed = true;
        } else {
            $removed = $this->coll->remove($offset);
        }

        if (! $removed && ! $arrayAccess) {
            return $removed;
        }

        $this->changed();

        return $removed;
    }
private function doRemove ( $ offset , $ arrayAccess ) { $ this -> initialize ( ) ; if ( $ arrayAccess ) { $ this -> coll -> offsetUnset ( $ offset ) ; $ removed = true ; } else { $ removed = $ this -> coll -> remove ( $ offset ) ; } if ( ! $ removed && ! $ arrayAccess ) { return $ removed ; } $ this -> changed ( ) ; return $ removed ; }
Actual logic for removing element by its key.

@param mixed $offset
@param bool  $arrayAccess

@return bool
Actual logic for removing element by its key .