public static function remove($storage, $setting)
    {
        if (!is_array($storage) || empty($setting)) {
            throw new ArrayStorageException('Invalid parameters specified');
        }

        $setting = self::parseSetting($setting);

        if (empty($setting)) {
            throw new ArrayStorageException('Empty setting');
        }

        if (is_array($setting)) {
            return self::removeByIndex($storage, $setting);
        }
        if (!array_key_exists($setting, $storage)) {
            throw new ArrayStorageException(
                sprintf('setting "%s" does not exist in storage object', $setting)
            );
        }
        unset($storage[$setting]);
        return $storage;
    }
public static function remove($storage, $setting)
    {
        if (!is_array($storage) || empty($setting)) {
            throw new ArrayStorageException('Invalid parameters specified');
        }

        $setting = self::parseSetting($setting);

        if (empty($setting)) {
            throw new ArrayStorageException('Empty setting');
        }

        if (is_array($setting)) {
            return self::removeByIndex($storage, $setting);
        }
        if (!array_key_exists($setting, $storage)) {
            throw new ArrayStorageException(
                sprintf('setting "%s" does not exist in storage object', $setting)
            );
        }
        unset($storage[$setting]);
        return $storage;
    }
public static function remove ( $ storage , $ setting ) { if ( ! is_array ( $ storage ) || empty ( $ setting ) ) { throw new ArrayStorageException ( 'Invalid parameters specified' ) ; } $ setting = self :: parseSetting ( $ setting ) ; if ( empty ( $ setting ) ) { throw new ArrayStorageException ( 'Empty setting' ) ; } if ( is_array ( $ setting ) ) { return self :: removeByIndex ( $ storage , $ setting ) ; } if ( ! array_key_exists ( $ setting , $ storage ) ) { throw new ArrayStorageException ( sprintf ( 'setting "%s" does not exist in storage object' , $ setting ) ) ; } unset ( $ storage [ $ setting ] ) ; return $ storage ; }
Removes a setting from a storage array.

@param array $storage
@param mixed $setting Can be an array, a string,
or a special formatted string
(eg 'app/path/project').

@return array The updated storage array.
@throws \WebServCo\Framework\Exceptions\ArrayStorageException
Removes a setting from a storage array .