PHPackages                             ejsmont-artur/php-proxy-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ejsmont-artur/php-proxy-builder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ejsmont-artur/php-proxy-builder
===============================

PHP Proxy Builder - AOP inspired proxy pattern library.

0.1.4(13y ago)17544MITPHPPHP &gt;=5.3.0

Since Mar 23Pushed 13y ago4 watchersCompare

[ Source](https://github.com/ejsmont-artur/phpProxyBuilder)[ Packagist](https://packagist.org/packages/ejsmont-artur/php-proxy-builder)[ Docs](https://github.com/ejsmont-artur/phpProxyBuilder)[ RSS](/packages/ejsmont-artur-php-proxy-builder/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (6)Used By (0)

phpProxyBuilder
===============

[](#phpproxybuilder)

[![Build Status](https://camo.githubusercontent.com/68f0f489941f2f263c5554290ac659ca70b62d41a8b4177a05570c4d8b202d4a/68747470733a2f2f7472617669732d63692e6f72672f656a736d6f6e742d61727475722f70687050726f78794275696c6465722e706e67)](https://travis-ci.org/ejsmont-artur/phpProxyBuilder)

Library allowing you to add proxy objects around arvitrary class instances to add behaviour at runtime.

Library employs concepts of Aspect Oriented Programming where a certain logic (like caching) is reused across the application without coupling the application code to the caching implementation.

Key Features
------------

[](#key-features)

1. Create proxy instances at runtime.
2. Proxy uses an instance of Advice (for example CachingAdvice) to add behaviour to the proxied object.
3. Proxy instance delegates method calls to the original (proxied) object.
4. Proxy, Advice and proxied class are 100% decoupled. Proxy does not know what is proxied nor what is the advice's purpose. Advice does not care about how it is being used and it can be used for any target class. Finally and most importantly client code does not have to know that any proxy exists. It consumes proxy as if it was the target instance itself. Proxy is transparent to the client.

Example
-------

[](#example)

```
