src/Kisma/Core/Utility/Option.php
public static function remove( &$options = array(), $key )
    {
        $_originalValue = null;

        if ( static::contains( $options, $key ) )
        {
            $_cleanedKey = static::_cleanKey( $key );

            if ( is_array( $options ) )
            {
                if ( !isset( $options[$key] ) && isset( $options[$_cleanedKey] ) )
                {
                    $key = $_cleanedKey;
                }

                if ( isset( $options[$key] ) )
                {
                    $_originalValue = $options[$key];
                    unset( $options[$key] );
                }
            }
            else
            {
                if ( !isset( $options->{$key} ) && isset( $options->{$_cleanedKey} ) )
                {
                    $key = $_cleanedKey;
                }

                if ( isset( $options->{$key} ) )
                {
                    $_originalValue = $options->{$key};
                }

                unset( $options->{$key} );
            }
        }

        return $_originalValue;
    }
public static function remove( &$options = array(), $key )
    {
        $_originalValue = null;

        if ( static::contains( $options, $key ) )
        {
            $_cleanedKey = static::_cleanKey( $key );

            if ( is_array( $options ) )
            {
                if ( !isset( $options[$key] ) && isset( $options[$_cleanedKey] ) )
                {
                    $key = $_cleanedKey;
                }

                if ( isset( $options[$key] ) )
                {
                    $_originalValue = $options[$key];
                    unset( $options[$key] );
                }
            }
            else
            {
                if ( !isset( $options->{$key} ) && isset( $options->{$_cleanedKey} ) )
                {
                    $key = $_cleanedKey;
                }

                if ( isset( $options->{$key} ) )
                {
                    $_originalValue = $options->{$key};
                }

                unset( $options->{$key} );
            }
        }

        return $_originalValue;
    }
public static function remove ( & $ options = array ( ) , $ key ) { $ _originalValue = null ; if ( static :: contains ( $ options , $ key ) ) { $ _cleanedKey = static :: _cleanKey ( $ key ) ; if ( is_array ( $ options ) ) { if ( ! isset ( $ options [ $ key ] ) && isset ( $ options [ $ _cleanedKey ] ) ) { $ key = $ _cleanedKey ; } if ( isset ( $ options [ $ key ] ) ) { $ _originalValue = $ options [ $ key ] ; unset ( $ options [ $ key ] ) ; } } else { if ( ! isset ( $ options -> { $ key } ) && isset ( $ options -> { $ _cleanedKey } ) ) { $ key = $ _cleanedKey ; } if ( isset ( $ options -> { $ key } ) ) { $ _originalValue = $ options -> { $ key } ; } unset ( $ options -> { $ key } ) ; } } return $ _originalValue ; }
Unsets an option in the given array

@param array  $options
@param string $key

@return mixed
Unsets an option in the given array