Posts for magic-methods

PHP __call and __callStatic Magic methods

This is just a quick post to show the use of the magic methods __call and __callStatic. It’s following on in my <a href="http://blog.dougalmatthews.com/tag/magic-methods/">Magic Method series</a>. The

PHP __set and __get Magic methods

Object oriented programming principles encourage encapsulation, i.e. containing all the functionality inside a class. Usually this means member variables should be private or protected, one of the com

Lazy Loading in PHP with __autoload

__autoload is one of the magic methods added to PHP in version 5. It creates a very easy way for you to manage all your different class files. Actually, with __autoload you don’t ...