Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37288 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49299 invoked from network); 29 Apr 2008 10:16:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2008 10:16:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=letssurf@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=letssurf@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.245 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: letssurf@gmail.com X-Host-Fingerprint: 209.85.132.245 an-out-0708.google.com Received: from [209.85.132.245] ([209.85.132.245:38883] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/0F-04029-295F6184 for ; Tue, 29 Apr 2008 06:16:52 -0400 Received: by an-out-0708.google.com with SMTP id c14so47080anc.1 for ; Tue, 29 Apr 2008 03:16:47 -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=nNH1hGosC/uPyeniCna/jWq/v4FWb2QlP3yeCFQej/o=; b=Ke68ghTMvoEg5SiB5RTaPAPUo3C8GdM4BTW13hA+hsQXG6atNlt+P83AIhgX8uqTno8wf9toYiLzRVa3wkvJsMNpdnP3I8R5Hre8FU2gEwmiZJ3lWi3dONNaFm5eerD93CLuhhE6Ozy/vYh572Z8XH1z//A3dyFIufnXH/6dtas= 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=rqfFub6FpPz4Ekiz5uRuFXSaXpyVsg4v2daM0LO1m+1mUQImMEJ6RDhiwdsowWZeFiHFv30yFygW7Hozbo6GVPIrgvMv3HYeNaIKCTXdDxKbtLP6apCnKV42dFwyPOS52ZGxDleptK2GUQNzAgNq0mgf0Y6dNCVCRkjGsCN/jzQ= Received: by 10.100.47.13 with SMTP id u13mr2773161anu.25.1209464207251; Tue, 29 Apr 2008 03:16:47 -0700 (PDT) Received: by 10.100.110.14 with HTTP; Tue, 29 Apr 2008 03:16:47 -0700 (PDT) Message-ID: <462e563f0804290316p7549f104p9ec14dc4ff7b5606@mail.gmail.com> Date: Tue, 29 Apr 2008 11:16:47 +0100 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_9766_23555328.1209464207241" References: <48169695.9040803@omegavortex.net> <339714303.20080429114607@marcus-boerger.de> Subject: Re: [PHP-DEV] Class Properties in Interfaces? From: letssurf@gmail.com ("James Dempster") ------=_Part_9766_23555328.1209464207241 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I would start by saying it's bad design. you should use getters and setters which you can define in you interface -- /James On Tue, Apr 29, 2008 at 11:07 AM, John Carter -X (johncart - PolicyApp Ltd at Cisco) wrote: > Marcus, > > I understand why Interfaces can't have bodies, but could you explain why > Interfaces can't have properties? > > Thanks, > > John. > > -----Original Message----- > From: Marcus Boerger [mailto:helly@php.net] > Sent: 29 April 2008 10:46 > To: Jeremy Privett > Cc: PHP Developers Mailing List > Subject: Re: [PHP-DEV] Class Properties in Interfaces? > > Hello Jeremy, > > interfaces cannot have properties, nor can they have method bodies - > that is the whole purpose of interfafces. We are thinking of adding > traits which would allow for both but would treat inheritance > differently. Until we get that you would need to provide an abstract > interface to access data in the same way. > > marcus > > Tuesday, April 29, 2008, 5:31:33 AM, you wrote: > > > Hey list, > > > I was curious what everyone thought of implementing the ability to > > specify class members in interfaces. I've run into a couple of > > circumstances where I would like to specify public member names inside > > > of an interface to ensure that these members are accessed in a > > standard way and to ensure that they exist. Currently, trying to > > include them in an interface results in "*Fatal error*: Interfaces may > > > not include member variables in file/line number". > > > Thoughts? > > > Thanks. > > > -- > > Jeremy Privett > > C.E.O. & C.S.A. > > Omega Vortex Corporation > > > http://www.omegavortex.net > > > Please note: This message has been sent with information that could be > > > confidential and meant only for the intended recipient. If you are not > > > the intended recipient, please delete all copies and inform us of the > > error as soon as possible. Thank you for your cooperation. > > > > > > Best regards, > Marcus > > > -- > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, > visit: http://www.php.net/unsub.php > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > ------=_Part_9766_23555328.1209464207241--