protected function _overwrite(&$old, $new)
    {
        if (!empty($old)) {
            foreach ($old as $key => $var) {
                if (!isset($new[$key])) {
                    unset($old[$key]);
                }
            }
        }
        foreach ($new as $key => $var) {
            $old[$key] = $var;
        }
    }
protected function _overwrite(&$old, $new)
    {
        if (!empty($old)) {
            foreach ($old as $key => $var) {
                if (!isset($new[$key])) {
                    unset($old[$key]);
                }
            }
        }
        foreach ($new as $key => $var) {
            $old[$key] = $var;
        }
    }
protected function _overwrite ( & $ old , $ new ) { if ( ! empty ( $ old ) ) { foreach ( $ old as $ key => $ var ) { if ( ! isset ( $ new [ $ key ] ) ) { unset ( $ old [ $ key ] ) ; } } } foreach ( $ new as $ key => $ var ) { $ old [ $ key ] = $ var ; } }
Used to write new data to _SESSION, since PHP doesn't like us setting the _SESSION var itself.

@param array $old Set of old variables => values
@param array $new New set of variable => value
@return void
Used to write new data to _SESSION since PHP doesn t like us setting the _SESSION var itself .