Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56180 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53006 invoked from network); 9 Nov 2011 01:23:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Nov 2011 01:23:25 -0000 Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:64735] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/22-37981-C06D9BE4 for ; Tue, 08 Nov 2011 20:23:24 -0500 Received: by ywb26 with SMTP id 26so1325022ywb.29 for ; Tue, 08 Nov 2011 17:23:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=T/MyiXojcr0i80ezeCkmOEcfBqOcsoRv2CPzBiSzIuo=; b=SWOfsHEsoHD5sdEAYhgPgCLS0ucVL/vpUfrmUvnyvmZic/guu0UFpbeOL0r3V7f7Rj sE7jFwd9eXoMIItbfipfZM7jmKOjYdaoVj3Ae1TzfA9tHVQrInoEzFgK1B3KUx8ZHDMv wn80VxzNwLD3FE9A5tpsBaKmm910uFViYx7ts= Received: by 10.182.13.3 with SMTP id d3mr60890obc.20.1320801802116; Tue, 08 Nov 2011 17:23:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.221.71 with HTTP; Tue, 8 Nov 2011 17:23:01 -0800 (PST) In-Reply-To: References: <4EB81703.7030605@hoa-project.net> <4EB81C84.8010609@hoa-project.net> <4EB820BB.2030009@lsces.co.uk> <4EB822D4.4060306@hoa-project.net> <4EB89C36.5000503@garfieldtech.com> <4EB8A22B.8000607@lerdorf.com> Date: Tue, 8 Nov 2011 23:23:01 -0200 Message-ID: To: Nikita Popov Cc: Rasmus Lerdorf , Larry Garfield , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] SplClassLoader RFC Voting phase From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") For all those interested, I implemented what I referred as item 2: After some thought it makes sense, but only if interface then defines the setMode prototype. The background for this is supported if the user decides to enhance the base class to support caching, requiring the injection of the Cache layer in constructor. If it's part of the interface, it cannot be changed. RFC is now updated covering this. If you have more questions or suggestions, feel free to tell me. On Tue, Nov 8, 2011 at 3:55 PM, guilhermeblanco@gmail.com wrote: > Hi Nikita, > > Thanks. > It's your option and I won't fight. But it seems my proposal is not yet 1= 00%. > Some things I have either identified or people have reported. > > 1- Remove ->register() and ->unregister(), and make the > spl_autoload_register to support SplClassLoader. > > I'm really +0 on this one. > But since the proposal covers an OO approach for autoload, it makes > sense the registering is pat of the available API, not in procedural > land. > > 2- Remove constructor prototype in interface > > After some thought it makes sense, but only if interface then defines > the setMode prototype. > The background for this is supported if the user decides to enhance > the base class to support caching, requiring the injection of the > Cache layer in constructor. If it's part of the interface, it cannot > be changed. > I took this example after looking at Symfony's > ApcUniversalClassLoader: > https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Clas= sLoader/ApcUniversalClassLoader.php > > > What do you think about these 2 points? > > Even if you're against the proposal, for sure you can still help to > make it consistent. > > > Cheers, > > On Tue, Nov 8, 2011 at 3:39 PM, Nikita Popov = wrote: >> On Tue, Nov 8, 2011 at 6:28 PM, guilhermeblanco@gmail.com >> wrote: >>> Because there's no need to bring to C a single foreach. >>> Also, if you re-read the RFC, you'll see that SplClassLoader is >>> extendable for personalized developer needs, such as an addAll or an >>> APC lookup. >> After your changes the RFC looks much more decent. I am still opposed >> to the idea of this going into core (mainly because there is no >> necessity), but now the implementation is somewhat more useful. >> >> Nikita >> > > > > -- > Guilherme Blanco > Mobile: +55 (11) 8118-4422 > MSN: guilhermeblanco@hotmail.com > S=C3=A3o Paulo - SP/Brazil > --=20 Guilherme Blanco Mobile: +55 (11) 8118-4422 MSN: guilhermeblanco@hotmail.com S=C3=A3o Paulo - SP/Brazil