Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56435 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6689 invoked from network); 19 Nov 2011 21:12:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2011 21:12:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=ava3ar@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ava3ar@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: ava3ar@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:45200] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/20-03486-BCB18CE4 for ; Sat, 19 Nov 2011 16:12:43 -0500 Received: by vcbgb30 with SMTP id gb30so599694vcb.29 for ; Sat, 19 Nov 2011 13:12:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=U/uH8mSXdFOHO/t4m4t8uMKN9KCH+qgygkXnkWfFvI0=; b=d2LdXHNDxmI1lajBULLyg4QBIlnYP7YMFohznKy2iLrNFR4iOfNUTmw/LDgqLgl7b6 z0ILrjz7YV4GSXI7J5f/+3py67ZHx/tsEeTjtXTZmJUVoDzvt6wgYz0v9JxglDsvtJq/ hxhpmB3lFEn12PJ5g00+MMRSZWAY6EkC2vqzY= Received: by 10.52.38.65 with SMTP id e1mr8949219vdk.131.1321737160124; Sat, 19 Nov 2011 13:12:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.7.78 with HTTP; Sat, 19 Nov 2011 13:12:19 -0800 (PST) In-Reply-To: <79A6C298-1475-4B69-A47D-27D3DEA4BC0E@strojny.net> References: <9570D903A3BECE4092E924C2985CE48539811627@MBX206.domain.local> <79A6C298-1475-4B69-A47D-27D3DEA4BC0E@strojny.net> Date: Sat, 19 Nov 2011 21:12:19 +0000 Message-ID: To: Lars Strojny Cc: Clint M Priest , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=bcaec51d2a38ea679f04b21ce9cd Subject: Re: [PHP-DEV] Multiple Visibility Level Getters/Setters From: ava3ar@gmail.com (Keloran) --bcaec51d2a38ea679f04b21ce9cd Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable personally i think only public should be done with this method all others should be follow the __set/__get method, since if you need special rules, then they would be set-able by a public method On Sat, Nov 19, 2011 at 7:45 PM, Lars Strojny wrote: > Just throw an error if conflicting accessors are defined. In the case of > subtypes: accessors may broaden the interface, but not limit it =3D> LSP.= So > it=92s fine to make a parents protected accessor public, but not the othe= r > way around. > > Am 19.11.2011 um 02:46 schrieb Clint M Priest: > > > What would everyone think about multiple levels of visibility for > getters/setters? > > > > class Sample { > > > > public $Variable { > > public get { return "Public"; } > > protected get { return "Protected"; } > > private get { return "Private"; } > > > > public set { ... } > > private set { ... } > > } > > } > > > > Whichever getter/setter would be called with the most restricted access= , > so externally public, internally protected (if inherited) or private from > within. > > > > Any value to this? I can see some use cases and wouldn't be any more > difficult to implement into what I'm already doing. > > > > -Clint > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --bcaec51d2a38ea679f04b21ce9cd--