Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18409 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82174 invoked by uid 1010); 25 Aug 2005 10:51:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82159 invoked from network); 25 Aug 2005 10:51:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2005 10:51:55 -0000 X-Host-Fingerprint: 64.233.184.201 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.201:15237] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 8F/66-28235-AC2AD034 for ; Thu, 25 Aug 2005 06:51:54 -0400 Received: by wproxy.gmail.com with SMTP id i24so99410wra for ; Thu, 25 Aug 2005 03:51:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cTx14MymKYOtc656I4c0HOWNJpmJIHDG35ysK4iy3WjJOhQ2xLBNzYQE7c6GBrOlTP1aNi8kHzE/mvmLXDWxpUUOvHhpodSXq/y2cCe7d1tjE+9TLidt2UHXL9eMz74Ye07MHm0CTBKw8LIS4Wtnim8w8hboFmN/EecbrfhFRpA= Received: by 10.54.77.15 with SMTP id z15mr1779152wra; Thu, 25 Aug 2005 03:51:50 -0700 (PDT) Received: by 10.54.7.6 with HTTP; Thu, 25 Aug 2005 03:51:50 -0700 (PDT) Message-ID: Date: Thu, 25 Aug 2005 13:51:50 +0300 To: internals@lists.php.net In-Reply-To: <430D9F7C.3020501@cschneid.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <430D9F7C.3020501@cschneid.com> Subject: Re: Real properties in PHP From: manchokapitancho@gmail.com (Marian Kostadinov) On 8/25/05, Christian Schneider wrote: > Marian Kostadinov wrote: > > public getter fullName { // may also have () > > return "{$this->firstName} {$this->lastName}"; > > } > > > > public setter fullName ($value) { // may also not have ($value) but > > a special var. > > list ($this->firstName, $this->lastName) =3D explode (' ', $value, 2= ); > > } >=20 > This can be easily done with >=20 > function __get($name) > { > $get =3D "get_$name"; >=20 > return $this->$get(); > } >=20 > function __set($name, $value) > { > $set =3D "set_$name"; >=20 > $this->$set($value); > } >=20 > in your base class (the function names are then get_fullName/set_fullName= . >=20 > - Chris >=20 I know this solutions but it does not solve the property visibility issues and good overloading rules like in common methods. Let's say you have about 6-7 suche proterties which you expect to overload and some of the are private e.t.c