News Feed
Jobs Feed
Sections




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

Liip Blog:
First Release of Proxy-Object
July 15, 2011 @ 11:06:34

On the Liip blog Bastian Feder has announced the first release of a tool that helps you proxy your objects (overlay them with a layer that exposes properties and methods) following the proxy object design pattern in PHP.

The outcome is this little library making it much easier to generate a proxy of your system under test (SUT). Another thought on this library was, that it should be very easy to use if you know the way to mock classes and methods in PHPUnit. Proxy-object has almost the same API, but does not change the behavior of the proxied class/method. The only purpose is to expose hidden methods and members.

The scripts, found on github, give you a simple way to define a proxy over a given class' functionality and define methods/member variables to be exposed. He includes two code examples, one of each type. There's also an example of making the proxy object without calling the constructor, useful in certain cases when the initialization of the object doesn't need to happen.

You can also find out more about the usage of this tool in this new post to Bastian's blog.

0 comments voice your opinion now!
proxy object designpattern overlay tool method member


blog comments powered by Disqus

Similar Posts

Doctrine Blog: Doctrine 1.0.8 and 1.1.0-RC2 Released

Stubbles Blog: Some remarks to serialization without pity

Liip Blog: First Release of Proxy-Object

SomeCoders.com: Member Managment System Using PHP, AJAX and script.aculo.us (Part 1)

Tobias Schlitt's Blog: Avoid an endless pifall


Community Events











Don't see your event here?
Let us know!


hack performance introduction database symfony2 release language unittest package application facebook podcast install opinion framework hhvm component support composer security

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework