Quantcast
Channel: Reflecting private properties
Browsing latest articles
Browse All 24 View Live

Derick at Fri, 15 Feb 2008 14:11:19 +0100

It's setAccessible(), not setAccesible().

View Article



Toby at Fri, 15 Feb 2008 14:34:58 +0100

K, fixed here, too. ;)

View Article

PHPDeveloper.org at Fri, 15 Feb 2008 15:48:54 +0100

Tobias Schlitt has posted a handy tip about using the Reflection ...

View Article

Michael Gauthier at Sat, 16 Feb 2008 20:44:14 +0100

Does the new method return a clone of internal objects? If not, encapsulation could be broken. For example, you could return an internal private property and modify it in a way that would break the class.

View Article

sapphirecat at Sun, 17 Feb 2008 14:09:58 +0100

The first code snippet worked in 5.1.6--something was broken since then.

View Article


Derick at Sun, 17 Feb 2008 17:18:09 +0100

No, it does not clone anything. You can't change the value though... just read it.

View Article

Toby at Sun, 17 Feb 2008 17:19:14 +0100

No, objects stored in private properties are not cloned and you are correct, that encapsulation is broken by this. This is the reason for the setAccessible() method, to ensure the developer knows, what...

View Article

Blog of Max Horvath at Thu, 13 Mar 2008 19:23:33 +0100

While it's absolutly correct that direct access to private properties is strictly forbidden in PHP, it's quite disturbing that even reflection cannot do it when you're writing Unit Tests. Sometimes you...

View Article


Fran at Tue, 02 Feb 2010 18:07:21 +0100

It seems that this does not works now: Fatal error: Call to undefined method ReflectionProperty::setAccessible() My version: PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: Jan 6 2010...

View Article


Fran at Tue, 02 Feb 2010 18:20:44 +0100

Oops! I see that you're using PHP5.3, so forget my previous comment, it's clear that the problem should be that this feature is not supported on PHP5.2 that's what I'm using.

View Article

Ahmad Al Jayousi at Tue, 23 Nov 2010 14:36:07 +0100

Ahmad Al Jayousi Philadelphia University Jordan http://www.philadelphia.edu.jo E-mail: aaljayousi@philadelphia.edu.jo

View Article

Lu4 at Tue, 11 Jan 2011 00:56:57 +0100

I think that using setAccessible(true) is a rubbish, when people are using reflection aren't they already aware of what are they doing?

View Article

Lu4 at Tue, 11 Jan 2011 01:07:49 +0100

Reflection is good for delegates implementation, not just call_user_func function that calls public class members but, the real delegates to private class members. Things like Events and EventHandlers...

View Article


Adrian at Fri, 13 Jan 2012 10:26:09 +0100

Hi have, principally, the same approach but more bound to the concern, imho:

View Article

www.justshoppingcenter.com at Wed, 20 Jun 2012 10:53:30 +0200

I am writing a research paper and collecting information on this topic. Your post is one of the better that I have read. Thank you for putting this information into one location.

View Article


online accounting at Thu, 28 Jun 2012 08:11:25 +0200

am truly not too everyday with this dominate but I do equal to see blogs for layout ideas. You truly distended upon a mortal that I usually don't work often

View Article

Super beta Prostrate at Wed, 13 Mar 2013 12:27:33 +0100

A very useful post this! Actually I was learning about the coding in php and your site has given me some of the important information to learn it easily. I am going to explore the other pages of your...

View Article


www.bestforcasinobonus.com at Wed, 17 Apr 2013 05:28:58 +0200

The more specific meaning, which is usually the first one students encounter, refers to a tendency to distinguish unfairly between different classes of people, such as people of different races...

View Article

www.bestforcasinobonus.com at Wed, 17 Apr 2013 05:29:19 +0200

http://www.bestforcasinobonus.com The more specific meaning, which is usually the first one students encounter, refers to a tendency to distinguish unfairly between different classes of people, such as...

View Article

www.bestforcasinobonus.com at Wed, 17 Apr 2013 05:29:40 +0200

The more specific meaning, which is usually the first one students encounter, refers to a tendency to distinguish unfairly between different classes of people, such as people of different races

View Article

cell phone holder at Wed, 24 Apr 2013 13:48:43 +0200

The author has written an excellent article. You made your point and not much to discuss. It's like this universal truth that you can not argue with the truth is not universal, everything has its...

View Article


www.oneaccessinternet.com at Thu, 25 Apr 2013 02:36:29 +0200

I admit with your Blog and I will be back to examine it more in the future so please keep up your work.

View Article


http://pinterest.com/lvlouisvuitton/ at Mon, 13 May 2013 07:51:48 +0200

The 2013 Louis Vuitton Handbags are classic and a girl must have at least one in her closet. Chic, classic style, classy and good quality.

View Article

elektronik sigara at Mon, 13 May 2013 19:54:11 +0200

I was doing a project and for that I was looking for related information. Some of the points are very useful. Do share some more material if you have.

View Article
Browsing latest articles
Browse All 24 View Live


Latest Images