Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37285 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41111 invoked from network); 29 Apr 2008 09:46:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2008 09:46:09 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:52301] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/6D-04029-06EE6184 for ; Tue, 29 Apr 2008 05:46:09 -0400 Received: from MBOERGER-ZRH (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id B0C5811F317; Tue, 29 Apr 2008 11:46:05 +0200 (CEST) Date: Tue, 29 Apr 2008 11:46:07 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <339714303.20080429114607@marcus-boerger.de> To: Jeremy Privett CC: PHP Developers Mailing List In-Reply-To: <48169695.9040803@omegavortex.net> References: <48169695.9040803@omegavortex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Class Properties in Interfaces? From: helly@php.net (Marcus Boerger) 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