Newsgroups: php.doc,php.internals Path: news.php.net Xref: news.php.net php.doc:969381834 php.internals:48353 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79345 invoked from network); 19 May 2010 12:53:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 May 2010 12:53:07 -0000 Authentication-Results: pb1.pair.com header.from=petercowburn@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=petercowburn@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: petercowburn@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:39431] helo=mail-iw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/B0-09719-13FD3FB4 for ; Wed, 19 May 2010 08:53:05 -0400 Received: by iwn6 with SMTP id 6so2846755iwn.29 for ; Wed, 19 May 2010 05:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=UBoAMuFboyNR3J8ZBihUe48U5SqNSZSWB/EjOuO66UY=; b=DGnc/h7F4gZJZjHBCVTInSl+/PkulmxmHhAcAmmIGnNPCTbqHtLLaVhrm6srNnOzVr qnfZ2QQoum8PMOxIcjhtDo4uszfwmFecDPD8gyNszxwseeilKM+4bs7ct9X548OuZ61b 5aREWXu/22sJLL1FunC2/72/gH2JUsXF4I27Q= 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 :cc:content-type:content-transfer-encoding; b=VdWIejsDI3TUBlrep95VDBpjG9ANVvCQ7f7Wx12XCrpVxLFndv01qQRbkxL5jsj+3f qwHznA7O4MGsQU6xriAuMvLqk0Nuqfm7qG0Sy1GU67ezF21ZcIJfOOQh/CtdjKyoJ3tI 1/JC50bpXIk7JUoCC0sURDIsDa/eBTZ41oMhQ= MIME-Version: 1.0 Received: by 10.231.147.143 with SMTP id l15mr3523014ibv.9.1274273582725; Wed, 19 May 2010 05:53:02 -0700 (PDT) Received: by 10.231.161.193 with HTTP; Wed, 19 May 2010 05:53:02 -0700 (PDT) In-Reply-To: References: <4BF2AE6C.2060403@easyflirt.com> <4BF3D925.4050906@easyflirt.com> Date: Wed, 19 May 2010 13:53:02 +0100 Message-ID: To: RQuadling Cc: "mathieu.suen" , internals , PHP Documentation ML Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Interface and abstract method From: petercowburn@gmail.com (Peter Cowburn) On 19 May 2010 13:31, Richard Quadling wrote: > On 19 May 2010 13:27, mathieu.suen wrote: >> Ok so there is no real meaning behind the "abstract". >> Thanks >> >> On 05/18/2010 05:55 PM, Tjerk Anne Meesters wrote: >>> >>> Normally, PHP won't allow access types for interface methods, but the >>> reflection for SPL is defined inside the C code: >>> >>> static const zend_function_entry spl_funcs_OuterIterator[] =3D { >>> =A0 =A0 =A0 =A0 SPL_ABSTRACT_ME(OuterIterator, getInnerIterator, >>> arginfo_recursive_it_void) >>> =A0 =A0 =A0 =A0 {NULL, NULL, NULL} >>> }; >>> >>> IMO the SPL_ME should be used instead, but I wouldn't be bothered about= it >>> ;-) For what it's worth, the non-SPL interfaces use ZEND_ABSTRACT_ME or similar as far as I can tell. Also, reflection says that all of the interface methods are abstract (which they are, in the sense of not having any method body). >>> >>> On Tue, May 18, 2010 at 11:12 PM, mathieu.suen >>> =A0wrote: >>> >>>> >>>> Hi, >>>> >>>> In the SPL there is some interface that have abstract method: >>>> >>>> *Countable* { >>>> /* Methods */ >>>> abstract public int >>>> count >>>> ( void ) >>>> } >>>> >>>> While some interface have "none abstract" method. >>>> >>>> *OuterIterator* extends Iterator >>>> =A0{ >>>> /* Methods */ >>>> public Iterator getInnerIterator >>>> =A0( void= ) >>>> ..snip.. >>>> } >>>> >>>> Does =A0"abstract" keyword have a semantic? >>>> >>>> Thanks >>>> >>>> --Mathieu suen >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >> >> -- Mathieu Suen >> >> >> >> > > Seemingly not when it applies to an interface. > I think the key issue is that _in the docs_ some interface methods are marked up as abstract, yet others aren't. I suggest making them consistent, having them all being one or t'other. > -- > ----- > Richard Quadling > "Standing on the shoulders of some very clever giants!" > EE : http://www.experts-exchange.com/M_248814.html > EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp > Zend Certified Engineer : http://zend.com/zce.php?c=3DZEND002498&r=3D2134= 74731 > ZOPA : http://uk.zopa.com/member/RQuadling > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >