Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63365 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36952 invoked from network); 12 Oct 2012 08:37:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2012 08:37:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=bschussek@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bschussek@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: bschussek@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yh0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:41790] helo=mail-yh0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/A5-06472-5C6D7705 for ; Fri, 12 Oct 2012 04:37:27 -0400 Received: by mail-yh0-f42.google.com with SMTP id o21so855490yho.29 for ; Fri, 12 Oct 2012 01:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=e7VaRGbp9cAcQ0zKy//Y+LiiLj4n+i0DouHwWJnj4CU=; b=fA7V7XKtdth2juKYjZpR8HsGmBdAtPRfSWNhC+z8fhrWxOusQOddAbmVkad2yntHZR DsL0TlBsT9q/gcs4P8+f9tr3AVnh0cmQCM33510GVF8UHGJFWPdQVPebQ1KiXeX53OHt r4QufvNN/lWcCfZcWWB0Iu9Ve8mtYbR5sQVpYxfIf8HVHV8oJ5YJe7zPYH7YNp1aV57Z Tz6tu4BenCsjvRR7bUfkAk7oQaIBY/B3LxfXb4fk7Gnb3T0DMINvs0s++rUNuQgIS9jA +eGNM1YpTRByMw94dDC6iZ74NUmFu51YGNypZoHqHyxG/iNJHOosDMElNfIyFXY7AS/u N8kA== Received: by 10.101.166.35 with SMTP id t35mr1133514ano.63.1350031043400; Fri, 12 Oct 2012 01:37:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.129.8 with HTTP; Fri, 12 Oct 2012 01:36:53 -0700 (PDT) In-Reply-To: References: <9570D903A3BECE4092E924C2985CE485612B3B48@MBX202.domain.local> <5073328D.5000002@gmail.com> <50735165.8010703@aaronholmes.net> <9570D903A3BECE4092E924C2985CE485612B4353@MBX202.domain.local> <760ab4f994a78a846cf86aafda71e0e2@mohiva.com> <9570D903A3BECE4092E924C2985CE485612B4EFE@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE485612B526F@MBX202.domain.local> <9570D903A3BECE4092E924C2985CE485612B53B2@MBX202.domain.local> Date: Fri, 12 Oct 2012 10:36:53 +0200 Message-ID: To: Amaury Bouchard Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Propety Accessors v1.1 From: bschussek@gmail.com (Bernhard Schussek) Hi Amaury, 2012/10/12 Amaury Bouchard : > As I said, both syntaxes can work together. For example: > public:protected $a { > get() { return ($this->_prefix . $this->_a); } > set($val) { $this->_a = substr($val, 1); } > } A shortcoming of this syntax is that it does not offer a solution for the isset() and usset() accessors. Different visibility syntaxes for get/set and isset/unset would be unlogical and confusing. Also, public:protected implies an order which does not have to be kept in the block AFAIK. What is public and what is protected? public:protected $a { // ??? protected isset() { ... } private unset() { ... } get() { ... } set($value) { ... } } Bernhard