Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63453 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35568 invoked from network); 16 Oct 2012 10:52:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2012 10:52:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=tbprogrammer@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tbprogrammer@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: tbprogrammer@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:35122] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/FB-10021-55C3D705 for ; Tue, 16 Oct 2012 06:52:06 -0400 Received: by mail-ob0-f170.google.com with SMTP id ni5so6523182obc.29 for ; Tue, 16 Oct 2012 03:52:02 -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=vMOoaYtt2y8GM1bqsma30MKcUa3hlkRhum4EfhDBmHg=; b=FZ9ANFlYdUux2F4WaIJYbkll8ww7OF6qEq7lM0DkAhs+P285SX/DGfHCbVydjnt59A 4wqXo4GZvgHLXpa9baAabbntJO6vX502xYJ+PHaamu42MnAEESkmjDckiC5tYFIQp8Sd imAwzEU1bPMfOmFvpqR6g4qUU2Ubdj1KNXp44Gy6aQdYeu6JxhkNZrY7tvsVGimJ8OYo kuUyltsBowFMxuaUBmeaXt9W5wqM0XQHJRLrayQapRrOd8bUllvlEQTTUb3CjOVEQEEy g1lY8LPMvOsrQLB9lHJraGpH+kAATaS9l7nxKCPsJs1andkbk65Fsrj+YfeXuBD/NR/d eAMQ== Received: by 10.60.11.67 with SMTP id o3mr12436955oeb.43.1350384722932; Tue, 16 Oct 2012 03:52:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.11.170 with HTTP; Tue, 16 Oct 2012 03:51:42 -0700 (PDT) In-Reply-To: <507D3B6D.1090308@sugarcrm.com> References: <9570D903A3BECE4092E924C2985CE485612B53E4@MBX202.domain.local> <507D24E0.9070203@sugarcrm.com> <507D2C54.6030702@sugarcrm.com> <507D3459.3020900@sugarcrm.com> <507D3B6D.1090308@sugarcrm.com> Date: Tue, 16 Oct 2012 03:51:42 -0700 Message-ID: To: Stas Malyshev Cc: Clint Priest , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8fb2066eb8747904cc2af1d7 Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2 From: tbprogrammer@gmail.com (Jazzer Dane) --e89a8fb2066eb8747904cc2af1d7 Content-Type: text/plain; charset=ISO-8859-1 I apologize for my confusing terminology - let me elaborate. There are no special syntaxes. The below code should help clear things up a bit: class MyClass { > private $otherProperty; > public $property { > get() {}; // Does not "have a body", as there is no code between the > curly braces. > set($value) { $this->otherProperty = $value; } // Does "have a body", > as there IS code between the curly braces. > } > } > On Tue, Oct 16, 2012 at 3:48 AM, Stas Malyshev wrote: > Hi! > > > Stas, the proposed "solution" thus far is to make the getter or setter > > final and private and not have a body. This would naturally throw an > > exception if it was accessed from anywhere but the class it was defined. > > The class it was defined in has to remember that it is virtually a > > read/write only accessor. > > What you mean by "not have a body" - is there special syntax for > body-less methods introduced? Then it should be in the RFC. How it is > implemented - what exactly is stored in the function table then? > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > --e89a8fb2066eb8747904cc2af1d7--