src/models/UserSetting.php
public function remove($key)
    {
        if ($this->has($key)) {
            $array = &$this->data;
            foreach (explode(self::SEPERATOR, $key) as $item) {
                if (array_key_exists($item, $array)) {
                    $lastArray = &$array;
                    $array = &$array[$item];
                }
            }
            
            unset($lastArray[$item]);
            if (empty($lastArray)) {
                unset($lastArray);
            }
            $this->save();
            return true;
        }
        
        return false;
    }
public function remove($key)
    {
        if ($this->has($key)) {
            $array = &$this->data;
            foreach (explode(self::SEPERATOR, $key) as $item) {
                if (array_key_exists($item, $array)) {
                    $lastArray = &$array;
                    $array = &$array[$item];
                }
            }
            
            unset($lastArray[$item]);
            if (empty($lastArray)) {
                unset($lastArray);
            }
            $this->save();
            return true;
        }
        
        return false;
    }
public function remove ( $ key ) { if ( $ this -> has ( $ key ) ) { $ array = & $ this -> data ; foreach ( explode ( self :: SEPERATOR , $ key ) as $ item ) { if ( array_key_exists ( $ item , $ array ) ) { $ lastArray = & $ array ; $ array = & $ array [ $ item ] ; } } unset ( $ lastArray [ $ item ] ) ; if ( empty ( $ lastArray ) ) { unset ( $ lastArray ) ; } $ this -> save ( ) ; return true ; } return false ; }
Remove an element from the user settings data array.

@param string $key
@return bool
Remove an element from the user settings data array .