public static function delete($key, &$array = null)
    {
        $segments = self::splitArrayPath($key);
        $key = array_pop($segments);
        $parentArrayKey = count($segments) ? implode('.', $segments) : null;
        $parentArray = &self::getRef($parentArrayKey, $array);
        
        if ($parentArray === null || !self::arrayHasKey($key, $parentArray)) {
            throw new AtomikException("Key '$key' does not exists");
        }
        
        $value = $parentArray[$key];
        unset($parentArray[$key]);
        return $value;
    }
public static function delete($key, &$array = null)
    {
        $segments = self::splitArrayPath($key);
        $key = array_pop($segments);
        $parentArrayKey = count($segments) ? implode('.', $segments) : null;
        $parentArray = &self::getRef($parentArrayKey, $array);
        
        if ($parentArray === null || !self::arrayHasKey($key, $parentArray)) {
            throw new AtomikException("Key '$key' does not exists");
        }
        
        $value = $parentArray[$key];
        unset($parentArray[$key]);
        return $value;
    }
public static function delete ( $ key , & $ array = null ) { $ segments = self :: splitArrayPath ( $ key ) ; $ key = array_pop ( $ segments ) ; $ parentArrayKey = count ( $ segments ) ? implode ( '.' , $ segments ) : null ; $ parentArray = & self :: getRef ( $ parentArrayKey , $ array ) ; if ( $ parentArray === null || ! self :: arrayHasKey ( $ key , $ parentArray ) ) { throw new AtomikException ( "Key '$key' does not exists" ) ; } $ value = $ parentArray [ $ key ] ; unset ( $ parentArray [ $ key ] ) ; return $ value ; }
Deletes a key from the store

Can delete through sub array using a path-like key
Can be used on any array by specifying the second argument

@see Atomik::get()
@param string $key
@param array $array The array on which the operation is applied
@return mixed The deleted value
Deletes a key from the store