Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53578 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6871 invoked from network); 25 Jun 2011 05:13:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jun 2011 05:13:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=arraypad@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arraypad@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arraypad@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:37908] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/91-16311-98E650E4 for ; Sat, 25 Jun 2011 01:13:45 -0400 Received: by vxi39 with SMTP id 39so2841554vxi.29 for ; Fri, 24 Jun 2011 22:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=2gsyVuDtEG+pObF0z+haC5P+P3H2wvpawwc5dTdBxJA=; b=HITTU0ChowjN2TOz+Xw9xaKaIwcOSGZ4DabWIinnumYrpGr89tX6YdY384KqA3UC7z 8a5qhnj+XdanhZRD5ROKj/vsqdIxzJnxUiefCeg2Av7BvkTUH1S9C8VX6WF7cYS6/+e4 RlogsKg/9KVd98XMlSEeLRcLpenvPTrYLRjjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=QBtbeWmSX4Dbh9D0wV2eUo2kqRA96mFp38rOADcJEWjqYYhtFhNdkIbsUdFLO2h4KZ fJlBFDvm+LhA145dGkyqRgLIFuJVaBXCtqP+htUcOwaOSbJLkEFZf/CzjKL/LEsjpn0b V0T5ksRVDYbYYR5bNycULkwBPYMChewlYiykE= MIME-Version: 1.0 Received: by 10.52.185.8 with SMTP id ey8mr5776029vdc.68.1308978822999; Fri, 24 Jun 2011 22:13:42 -0700 (PDT) Received: by 10.52.182.39 with HTTP; Fri, 24 Jun 2011 22:13:42 -0700 (PDT) In-Reply-To: References: Date: Sat, 25 Jun 2011 06:13:42 +0100 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Object oriented session handlers From: arraypad@gmail.com (Arpad Ray) Hi, I've updated the patches again. The most significant change is that the shutdown function registers another shutdown function when it's called, to (almost) ensure that it's always the last one, and therefore user shutdown functions should always find the session available as expected. I'd especially appreciate feedback or improvements on this because it feels very hacky. One option is to add a separate hash of internal shutdown functions which run after the user shutdown functions, another is to add an element to the module entry, a la RSHUTDOWN, which gets run in between steps 1 and 2 in the shutdown process (see main.c:1632). I don't know what other uses there are for this, so I've stuck with the double shutdown function method in this patch. I'd also like to avoid complicating the vote on this patch with a tangential issue. I've added a second optional argument to session_set_save_handler($obj) which is true by default and indicates whether the shutdown function should be registered - this is so that users with their own manual shutdown procedure can disable the automatic approach. I think that most users will take advantage of the automatically registered shutdown function, but this lets those with a custom shutdown procedure handle the session shutdown within the lifetime of the script and save the slight overhead. http://spellign.com/patches/php-trunk-session-oo10.patch http://spellign.com/patches/php-trunk-session-oo10-tests.patch Regards, Arpad