Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55929 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73453 invoked from network); 24 Oct 2011 16:52:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Oct 2011 16:52:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=pencap@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pencap@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: pencap@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:59547] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/C4-43916-ED795AE4 for ; Mon, 24 Oct 2011 12:52:47 -0400 Received: by vwl1 with SMTP id 1so5204249vwl.29 for ; Mon, 24 Oct 2011 09:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=OEt63glTgOR2+UicYhR5+6nBi2QylmGsEDWFs1vjTXc=; b=mcdt5a+KlDiOV2apdQGtsx6m61dDfwzYDQ8hpnpNWfaC1jzkqa18p6KAPviEGgYlO2 PKSu/CgUAsjtubLyqke06unGnYeoPvefqc6XMnlnHbFvlUmAyDcM+o95YyBDvCCQvvKi TzBOrb9tc/h9NUywhLKUcfen2dHcZqQJ6sTOw= MIME-Version: 1.0 Received: by 10.52.70.98 with SMTP id l2mr8589030vdu.101.1319475164340; Mon, 24 Oct 2011 09:52:44 -0700 (PDT) Received: by 10.52.113.229 with HTTP; Mon, 24 Oct 2011 09:52:44 -0700 (PDT) In-Reply-To: References: <4E208FE7.4020606@sugarcrm.com> Date: Mon, 24 Oct 2011 11:52:44 -0500 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary=20cf307d031075e1e204b00e4017 Subject: Re: [PHP-DEV] SplClassLoader From: pencap@gmail.com (Mike Willbanks) --20cf307d031075e1e204b00e4017 Content-Type: text/plain; charset=UTF-8 On Mon, Oct 24, 2011 at 10:20 AM, Peter Cowburn wrote: > On 24 October 2011 15:57, David Coallier wrote: > > On 24 October 2011 16:53, Paul Dragoonis wrote: > >> On Mon, Oct 24, 2011 at 3:47 PM, guilhermeblanco@gmail.com > >> wrote: > >>> Hi internals, > >>> > >>> It's been a while since Stas accepted that, but it seems the class > >>> haven't been merged since then. > >>> What's the status of this? Can I expect SplClassLoader in 5.4.0? > >>> > >>> It seems it was approved, but wasn't merged and thread was lost in > space. =( > >>> > >>> There's an RFC for it: https://wiki.php.net/rfc/splclassloader > >>> There's a patch for it: https://github.com/metagoto/splclassloader > > > > If we can identify where we want it in the structure of the PHP > > project, I'll be happy to merge the implementation and modify the > > config files to have --enable-spl-autoloader or such. > > Forgive me for not reading the code (yet) but what need is there for > an --enable-spl-autoloader flag? > I agree; I do not believe that there is a need for an enable flag in this case. It should just be there or not at all. > > What are peoples' thoughts on the name of the class? The word "auto" > fits best with all that has come before, yet the proposal here uses > "class": what about SplAutoloader? With the introduction of this new > class, whatever the name, what happens to __autoload() and > spl_autoload_register(), if anything? How many ways do we want/need to > load a class? I believe by calling a class SplAutoloader when there is already an implementation of spl_autoload that does something very different it would be advised to not name it of the same sort... this is what people would start to think about. The name SplClassLoader is much more specific. If we needed to keep the word "Auto" it would seem better named SplClassAutoLoader. spl_autoload is completely separate from __autoload today. Also __autoload does differ from the spl_autoload facility in several ways and is not recommended even from the manual standpoint: www.php.net/autoload. Secondarily; a class loader cannot autoload functions - it is made to only implement PSR-0 and nothing more. While you may use spl_autoload to load classes the implementation can also load in functions. This class is really just enforcing a specific standardization. --20cf307d031075e1e204b00e4017--