concept method call in category php

appears as: method calls, method call
PHP in Action: Objects, Design, Agility

This is an excerpt from Manning's book PHP in Action: Objects, Design, Agility.

We’ll start this chapter by going over the basics of objects; then we’ll look at one of the most useful of the features introduced in PHP 5: exception handling. After that, we’ll make sure we understand the most important feature of the PHP 5 object model: the fact that objects are treated by reference. This makes object handling much more natural and eliminates the need to use the rather cumbersome references mechanism in PHP 4. Finally, we’ll look at how to magically manipulate method calls using one of the more advanced features that were introduced in PHP 5.

We will start this section by clarifying the official term overloadable method calls and how it relates to the idea of intercepting method calls. Then we’ll see a couple of examples of how this can be used: Java-style method overloading, and a general logging mechanism for method calls. Finally, we’ll take a peek at a related subject: how to use the autoload feature to control what happens when a class is instantiated.