The Proxy Pattern in PHP 5

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
This week I've I continued my series of design patterns examples using
PHP 5 with the Bridge Pattern and the Flyweight Pattern.

Here now is my 19th design pattern example using PHP 5, the Proxy

In the proxy pattern one class stands in for and controll all calls to
another class.

This could be because the real subject class is on another platform,
the real subject is "expensive" to create so we only create it if
necessary, or to controll access to the real subject class.

A proxy can also add access functionality, such as keeping track of
how many times a real subject is called.

Proxy is a nice little pattern, being both fairly simple and widely

Re: The Proxy Pattern in PHP 5

FluffyCat wrote:
Quoted text here. Click to load it

Just want to thank you for you lessons on Design Patterns in PHP 5.

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA    
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)

Site Timeline