Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Using Method Call Overloading in PHP 4
Jul 18, 2006 @ 17:44:36

DevShed has posted part two in the series they've worked up covering overloading classes inside of a PHP4 environment. In this edition (two of three) they focus on method call overloading, a step up from the previous property overloading.

This is part two of the series "Overloading classes in PHP." In three tutorials, this series teaches how to overload your classes in PHP 4 by using the "overload()" PHP built-in function, in conjunction with the implementation of the "__set()", "__get()" and "__call()" methods, and explores the native support of object overloading in PHP 5.

They first take a step back and go over the concepts behind the property overloading from the previous part of the series. After being reminded of that (or hearing it for the first time for some), they translate that directly into a method for use on methods. And, with the help of a __call request, they show you how to make it all work together and overload the method call.

tagged: method overloading php4 tutorial part2 __call __get __set method overloading php4 tutorial part2 __call __get __set

Link:

DevShed:
Using Method Call Overloading in PHP 4
Jul 18, 2006 @ 17:44:36

DevShed has posted part two in the series they've worked up covering overloading classes inside of a PHP4 environment. In this edition (two of three) they focus on method call overloading, a step up from the previous property overloading.

This is part two of the series "Overloading classes in PHP." In three tutorials, this series teaches how to overload your classes in PHP 4 by using the "overload()" PHP built-in function, in conjunction with the implementation of the "__set()", "__get()" and "__call()" methods, and explores the native support of object overloading in PHP 5.

They first take a step back and go over the concepts behind the property overloading from the previous part of the series. After being reminded of that (or hearing it for the first time for some), they translate that directly into a method for use on methods. And, with the help of a __call request, they show you how to make it all work together and overload the method call.

tagged: method overloading php4 tutorial part2 __call __get __set method overloading php4 tutorial part2 __call __get __set

Link:

Greg Beaver's Blog:
phpDocumentor and __get/__set/__call - give us your ideas (RFC)
Jul 14, 2006 @ 11:06:00

In his latest post today, Greg Beaver is also taking a look at phpDocumentor and some of the documentation methods it allows, noting that providing the right notes on the "magic" functions has always been a point of difficulty.

One of the trickier feature requests for phpDocumentor has been documenting "magic" object properties and methods. By "magic" I am referring to properties and methods that are created dynamically by PHP 5.0+ userspace class methods __get, __set, __isset, __unset and __call.

He gives a code example of creating properties and a magic function (borp). To illustrate his point, he tries to specify the phpDocumentor format that would go with it - not an exact match, but with the help o ffour new tags it's made easier: @property, @property-read, @property-write, and @method.

tagged: phpdocumentor __get __set __call ideas magic functions property phpdocumentor __get __set __call ideas magic functions property

Link:

Greg Beaver's Blog:
phpDocumentor and __get/__set/__call - give us your ideas (RFC)
Jul 14, 2006 @ 11:06:00

In his latest post today, Greg Beaver is also taking a look at phpDocumentor and some of the documentation methods it allows, noting that providing the right notes on the "magic" functions has always been a point of difficulty.

One of the trickier feature requests for phpDocumentor has been documenting "magic" object properties and methods. By "magic" I am referring to properties and methods that are created dynamically by PHP 5.0+ userspace class methods __get, __set, __isset, __unset and __call.

He gives a code example of creating properties and a magic function (borp). To illustrate his point, he tries to specify the phpDocumentor format that would go with it - not an exact match, but with the help o ffour new tags it's made easier: @property, @property-read, @property-write, and @method.

tagged: phpdocumentor __get __set __call ideas magic functions property phpdocumentor __get __set __call ideas magic functions property

Link:


Trending Topics: