Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37286 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46573 invoked from network); 29 Apr 2008 10:08:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2008 10:08:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=johncart@cisco.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=johncart@cisco.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cisco.com designates 144.254.224.140 as permitted sender) X-PHP-List-Original-Sender: johncart@cisco.com X-Host-Fingerprint: 144.254.224.140 ams-iport-1.cisco.com Received: from [144.254.224.140] ([144.254.224.140:5230] helo=ams-iport-1.cisco.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/7E-04029-A93F6184 for ; Tue, 29 Apr 2008 06:08:27 -0400 X-IronPort-AV: E=Sophos;i="4.25,722,1199660400"; d="scan'208";a="7601024" Received: from ams-dkim-1.cisco.com ([144.254.224.138]) by ams-iport-1.cisco.com with ESMTP; 29 Apr 2008 12:08:23 +0200 Received: from ams-core-1.cisco.com (ams-core-1.cisco.com [144.254.224.150]) by ams-dkim-1.cisco.com (8.12.11/8.12.11) with ESMTP id m3TA8OBc003265 for ; Tue, 29 Apr 2008 12:08:24 +0200 Received: from xbh-ams-331.emea.cisco.com (xbh-ams-331.cisco.com [144.254.231.71]) by ams-core-1.cisco.com (8.13.8/8.13.8) with ESMTP id m3TA8NTC018692 for ; Tue, 29 Apr 2008 10:08:23 GMT Received: from xmb-ams-33e.emea.cisco.com ([144.254.231.75]) by xbh-ams-331.emea.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 29 Apr 2008 12:08:23 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 29 Apr 2008 12:07:53 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: In-Reply-To: <339714303.20080429114607@marcus-boerger.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] Class Properties in Interfaces? Thread-Index: Acip3giLJVshf6a6Qzeo6jvNObaghAAAizaQ References: <48169695.9040803@omegavortex.net> <339714303.20080429114607@marcus-boerger.de> To: X-OriginalArrivalTime: 29 Apr 2008 10:08:23.0785 (UTC) FILETIME=[F5928D90:01C8A9E0] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=1833; t=1209463704; x=1210327704; c=relaxed/simple; s=amsdkim1002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=johncart@cisco.com; z=From:=20=22John=20Carter=20-X=20(johncart=20-=20PolicyApp= 20Ltd=20at=20Cisco)=22=20 |Subject:=20RE=3A=20[PHP-DEV]=20Class=20Properties=20in=20I nterfaces? |Sender:=20; bh=M+QR1R6Sl2Jf1ufqlvfCwyHJws9sKfxkHxQOm8St94Y=; b=pvEiApJmVAMKNp6ySvK9LDKUJOmdM5GlqgmmtS5AuAo0p6wc1wUM1bCrD0 C5yf28AP8MGfDCKlNLjSUJTxTNNcSuQmBr4koLdRZ1PCmDy8W4+yZtexEIYU ZBmIe09Ofo; Authentication-Results: ams-dkim-1; header.From=johncart@cisco.com; dkim=pass ( sig from cisco.com/amsdkim1002 verified; ); Subject: RE: [PHP-DEV] Class Properties in Interfaces? From: johncart@cisco.com ("John Carter -X (johncart - PolicyApp Ltd at Cisco)") Marcus, I understand why Interfaces can't have bodies, but could you explain why Interfaces can't have properties?=20 Thanks, John. -----Original Message----- From: Marcus Boerger [mailto:helly@php.net]=20 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=20 > specify class members in interfaces. I've run into a couple of=20 > circumstances where I would like to specify public member names inside > of an interface to ensure that these members are accessed in a=20 > standard way and to ensure that they exist. Currently, trying to=20 > 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=20 > 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