Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37312 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51400 invoked from network); 29 Apr 2008 17:29:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2008 17:29:59 -0000 Authentication-Results: pb1.pair.com header.from=quickshiftin@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=quickshiftin@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.189 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: quickshiftin@gmail.com X-Host-Fingerprint: 209.85.128.189 fk-out-0910.google.com Received: from [209.85.128.189] ([209.85.128.189:52491] helo=fk-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/5B-26601-61B57184 for ; Tue, 29 Apr 2008 13:29:59 -0400 Received: by fk-out-0910.google.com with SMTP id f33so96686fkf.7 for ; Tue, 29 Apr 2008 10:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=DjsU8jZMo7Po+vLe0PmxA0ZRI0dv7AdBIfD7sJdSXo4=; b=Rch0ZECLaP1pIhmR/qddOPava+pA0KmLXd0N1ZPRlKv+Epa1N6ECHiysMauSCHcGKr6Ip6qUKB2pF+Jbkho9Y5qsow/xj8XN158eBtIG5dW2U6aWc3MCOvtY+aPHbxtP/p2J/S9cVKdIStKmnbBWnvaP3d3iEblkBRAaSLD8eLM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=OdezJBR1rnFhmoq00jPqpRoun+sKhLwxI1cLxT61Q3dKZe+uKr+Pu1MIaKFIP1CWJC3MvasSa4Ix9z08wjYVyClK+3dLlR7lGRog/xaKNsZPnKZA/kZ1fflUC5GmyNfEaES09IkwNLS6uXy+412E04DrnVhh1apphqB46/ngauE= Received: by 10.86.3.4 with SMTP id 4mr9648278fgc.79.1209490194520; Tue, 29 Apr 2008 10:29:54 -0700 (PDT) Received: by 10.86.59.15 with HTTP; Tue, 29 Apr 2008 10:29:54 -0700 (PDT) Message-ID: <7dd2dc0b0804291029y6b2d1e1cy749f62be681d8fa4@mail.gmail.com> Date: Tue, 29 Apr 2008 11:29:54 -0600 To: "John Carter -X (johncart - PolicyApp Ltd at Cisco)" Cc: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14109_17257351.1209490194483" References: <48169695.9040803@omegavortex.net> <339714303.20080429114607@marcus-boerger.de> <7dd2dc0b0804290817v3d8de030y1208a88f78c44411@mail.gmail.com> <7dd2dc0b0804290914k7f9ac686ic11074876ca1acca@mail.gmail.com> Subject: Re: Re: [PHP-DEV] Class Properties in Interfaces? From: quickshiftin@gmail.com ("Nathan Nobbe") ------=_Part_14109_17257351.1209490194483 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Apr 29, 2008 at 10:28 AM, John Carter -X (johncart - PolicyApp Ltd at Cisco) wrote: > Nathan, > > By example: > > interface EggLayer > > { > public $eggsLaid; > } > > class Chicken implements EggLayer; > > Some would say (and maybe I would too) that you should have a > getEggsLaid() method, that's fair enough. But why not the above? because, from above, $eggsLaid constitutes the implementation of any class that implements EggLayer. You say interfaces can't have properties because they require instance > variables. thats fine, in fact thats what i take the two terms to mean; however, there was an alternate definition given in an earlier post and i just wanted to clarify whether you were referring to that definition of property. hence forth i understand that you are not referring to that definition. > Why do they require instance variables? this was only based on the aforementioned definition of properties whereby a property is an instance variable that has respective getters and setters. in the absence of that definition, my statement is irrelevant. > I also think for the > purposes of this discussion, property and instance variable mean the > same thing. cool, then i would say that interfaces cannot have public properties in them because it imposes implementation requirements on any implementors. to specify implementation details, there is the abstract class. -nathan ------=_Part_14109_17257351.1209490194483--