Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41905 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19863 invoked from network); 13 Nov 2008 19:01:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Nov 2008 19:01:20 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:49115] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1D/9E-07308-F797C194 for ; Thu, 13 Nov 2008 14:01:20 -0500 Received: from MBOERGER-ZRH (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 1BD4E11F1AB; Thu, 13 Nov 2008 20:01:16 +0100 (CET) Date: Thu, 13 Nov 2008 20:01:11 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1317982846.20081113200111@marcus-boerger.de> To: Sebastian Bergmann CC: internals@lists.php.net In-Reply-To: <491B2E81.3070601@sebastian-bergmann.de> References: <491B2E81.3070601@sebastian-bergmann.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] ReflectionProperty::setValue() and ReflectionProperty::setAccessible() From: helly@php.net (Marcus Boerger) Hello Sebastian, allowing to read is more than enough. And ofr the record I did not like that at all. If you need to write to a private variable, then obviously your class design is wrong. And testing is no argument, as you can nicely design so that this is not necessary. marcus Wednesday, November 12, 2008, 8:29:05 PM, you wrote: > Currently ReflectionProperty::setValue() ignores the setting made by > ReflectionProperty::setAccessible(). Is this intentional or was it just > forgotten to handle ref->ignore_visibility in setValue()? > For some code I am working on it would be really helpful if setValue() > could optionally work with private and protected attributes. > -- > Sebastian Bergmann http://sebastian-bergmann.de/ > GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 Best regards, Marcus