A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearWhy I should use __get() and __set()-magic methods in php? [duplicate] - page 1
User InfoPosts
Why I should use __get() and __set()-magic methods in php? [duplicate]#1
Possible duplicate:
When do/should I use __construct(), __get(), __set(), and __call() in PHP?


This is one area that I have not found any good answer. Can anyone explain to me why/how to use them correctly? Aren(t they just a bad design decision?

posted date: 2009-04-15 10:17:00


Re: Why I should use __get() and __set()-magic methods in php? [duplicate]#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-15 10:17:01


Re: Why I should use __get() and __set()-magic methods in php? [duplicate]#3
Voted to close: "exact duplicate". Please see www.momige.com/250616/….

posted date: 2009-04-15 10:19:00


Re: Why I should use __get() and __set()-magic methods in php? [duplicate]#4
I think the documentation explains it best. And it(s called Overloading.__set() is run when writing data to inaccessible members. __get() is utilized for reading data from inaccessible members. It also has some examples of using these.

posted date: 2009-04-15 10:20:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.