Writing dynamic classes with PHP
I recently had the necessity to write a dynamic class (i.e. where methods, or properties of the class are determined during runtime) and in doing some research, stumbled on to this very helpful article :
The author (Jack Herrington) goes to a lot of trouble explaining how the magic __get(), __set() and __call() methods work and how best to use them.
It does get a little bit complicated towards the end, but is a good example of a)why one should or need to use a dynamic class/object and b)how to implement it successfully within your application.
Categories: PHP
dynamic class, magic method, object, PHP, tutorial, __call, __get, __set
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
