Skip to content

Latest commit

 

History

History

Proxy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Purpose

To interface to anything that is expensive or impossible to duplicate.

Examples

  • Doctrine2 uses proxies to implement framework magic (e.g. lazy initialization) in them, while the user still works with his own entity classes and will never use nor touch the proxies

UML Diagram

Alt Proxy UML Diagram

Code

You can also find this code on GitHub

BankAccount.php

BankAccount.php

HeavyBankAccount.php

HeavyBankAccount.php

BankAccountProxy.php

BankAccountProxy.php

Test

ProxyTest.php

Tests/ProxyTest.php