<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Building proxies, decorators and delegates in PHP5</title>
	<atom:link href="http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/</link>
	<description>Ivo's blog about PHP, the internet and life in general</description>
	<pubDate>Wed, 10 Mar 2010 12:57:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: paul</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8141</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Wed, 26 Jul 2006 15:51:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8141</guid>
		<description>While I think that proxying functions from more then one base object in one environment IS VERY useful when dealing with shared environments I beg you specify this explicitly. IE: This is a shared environment programming pattern do not use it to draw circles...  

Can't really se any true and undenyable reason to use these techniques while not invoking the all-to-well-known -"not my code, have to go round" reason, which is by the way just a sign of very poor analysis and granulation skills.

Other then that nice tute. - and I like the oracle halo of the company :D</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->While I think that proxying functions from more then one base object in one environment IS VERY useful when dealing with shared environments I beg you specify this explicitly. IE: This is a shared environment programming pattern do not use it to draw circles&#8230;  </p>
<p>Can&#8217;t really se any true and undenyable reason to use these techniques while not invoking the all-to-well-known -&#8221;not my code, have to go round&#8221; reason, which is by the way just a sign of very poor analysis and granulation skills.</p>
<p>Other then that nice tute. - and I like the oracle halo of the company <img src='http://www.jansch.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Lively</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8131</link>
		<dc:creator>Mike Lively</dc:creator>
		<pubDate>Tue, 04 Jul 2006 15:54:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8131</guid>
		<description>This can be worked around very easily by making the base class and all of it's decorators extend a parent interface. Using __call does mean that the interface will probably have to be empty. (That is unless you create a seperate interface for each method/group of methods that you anticipate decorating. Which gets cumbersome.)</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->This can be worked around very easily by making the base class and all of it&#8217;s decorators extend a parent interface. Using __call does mean that the interface will probably have to be empty. (That is unless you create a seperate interface for each method/group of methods that you anticipate decorating. Which gets cumbersome.)<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis Pallett</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8121</link>
		<dc:creator>Dennis Pallett</dc:creator>
		<pubDate>Tue, 04 Jul 2006 10:06:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8121</guid>
		<description>You're right about that, although it shouldn't really matter that ItalicHelloWorld has its own state.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->You&#8217;re right about that, although it shouldn&#8217;t really matter that ItalicHelloWorld has its own state.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivo Jansch</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8111</link>
		<dc:creator>Ivo Jansch</dc:creator>
		<pubDate>Tue, 04 Jul 2006 09:39:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8111</guid>
		<description>That is indeed correct, this would make the interface the same. However, in your solution, the ItalicHelloWorld would have its own state, meaning that doSomethingElse() would work on member variables of the ItalicHelloWorld instance and not on member variables of HelloWorld instance. (the difference between $this-&gt;m_member and $this-&gt;m_object-&gt;m_member)

Unless you reimplement all methods, which is the point of this article; using the AutoForward baseclass, you won't have to do that.

Also have a look at the security example near the end. It is applicable to virtually any class, which wouldn't be possible if SecurityAspect would inherit from one of them.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->That is indeed correct, this would make the interface the same. However, in your solution, the ItalicHelloWorld would have its own state, meaning that doSomethingElse() would work on member variables of the ItalicHelloWorld instance and not on member variables of HelloWorld instance. (the difference between $this->m_member and $this->m_object->m_member)</p>
<p>Unless you reimplement all methods, which is the point of this article; using the AutoForward baseclass, you won&#8217;t have to do that.</p>
<p>Also have a look at the security example near the end. It is applicable to virtually any class, which wouldn&#8217;t be possible if SecurityAspect would inherit from one of them.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis Pallett</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8101</link>
		<dc:creator>Dennis Pallett</dc:creator>
		<pubDate>Tue, 04 Jul 2006 09:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8101</guid>
		<description>Yes, you can, both child classes extend the HelloWorld class, and you can still use the decorator pattern, i.e.

$obj = new ItalicHelloWorld(
		new BoldHelloWorld(
			new HelloWorld()));</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Yes, you can, both child classes extend the HelloWorld class, and you can still use the decorator pattern, i.e.</p>
<p>$obj = new ItalicHelloWorld(<br />
		new BoldHelloWorld(<br />
			new HelloWorld()));<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivo</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8091</link>
		<dc:creator>Ivo</dc:creator>
		<pubDate>Mon, 03 Jul 2006 22:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8091</guid>
		<description>Thanks, I've corrected the samples. Still doing too much PHP4 I guess ;-)</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Thanks, I&#8217;ve corrected the samples. Still doing too much PHP4 I guess <img src='http://www.jansch.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> <!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Bidochko</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8081</link>
		<dc:creator>Andrew Bidochko</dc:creator>
		<pubDate>Mon, 03 Jul 2006 21:55:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8081</guid>
		<description>Why are you using assignment by refernce ($obj = &#038;new HelloWorld())?
It has been deprecated in php5.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Why are you using assignment by refernce ($obj = &#038;new HelloWorld())?<br />
It has been deprecated in php5.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephan Schmidt</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8071</link>
		<dc:creator>Stephan Schmidt</dc:creator>
		<pubDate>Mon, 03 Jul 2006 21:48:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8071</guid>
		<description>The big problem with this approach is, that is will not work if you are using instanceof or type hints in your code.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->The big problem with this approach is, that is will not work if you are using instanceof or type hints in your code.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivo</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8061</link>
		<dc:creator>Ivo</dc:creator>
		<pubDate>Mon, 03 Jul 2006 21:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8061</guid>
		<description>That is explained near the end of the post; because you cannot have something that is both bold and italic that way.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->That is explained near the end of the post; because you cannot have something that is both bold and italic that way.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aurelian</title>
		<link>http://www.jansch.nl/2006/07/03/building-proxies-decorators-and-delegates-in-php5/comment-page-1/#comment-8051</link>
		<dc:creator>aurelian</dc:creator>
		<pubDate>Mon, 03 Jul 2006 21:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jansch.nl/?p=441#comment-8051</guid>
		<description>So, you can write your own wiki syntax now :)</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->So, you can write your own wiki syntax now <img src='http://www.jansch.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
</channel>
</rss>
