<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>ireallylikesushi</title>
	
	<link>http://ireallylikesushi.com/blog</link>
	<description>Thoughts about the web.</description>
	<lastBuildDate>Tue, 22 Dec 2009 04:29:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ireallylikesushi" /><feedburner:info uri="ireallylikesushi" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Installing both Zend Server CE PHP 5.2 &amp; PHP 5.3 on Snow Leopard</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/THHjqriMWQc/</link>
		<comments>http://ireallylikesushi.com/blog/2009/12/21/installing-both-zend-server-ce-php-5-2-php-5-3-on-snow-leopard/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 04:29:43 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php 5.2]]></category>
		<category><![CDATA[php 5.3]]></category>
		<category><![CDATA[zend server]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=143</guid>
		<description><![CDATA[Overview I wanted to get both PHP 5.2 and PHP 5.3 installed on my MacBook Pro for development. Since Zend Server CE offers both of them conveniently package, this was a start, however by default you can only install and use one. The instructions below are for installing both however you can only one run [...]]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p>I wanted to get both PHP 5.2 and PHP 5.3 installed on my MacBook Pro for development. Since Zend Server CE offers both of them conveniently package, this was a start, however by default you can only install and use one. The instructions below are for installing both however you can only one run one version at a time. This is perfect for my own purpose as I wanted to switch between php versions when necessary. In addition by using this method, Zend Server will not automatically start up on boot, but this is primary due to my own goals (I will include additional instructions for how to keep automatic boot also).</p>
<p><strong>How this will work</strong></p>
<p>The ending goal is to do have this:</p>
<p>Zend Server CE PHP 5.2 installed at <strong>/usr/local/zend-5.2</strong>.</p>
<p>Zend Server CE PHP 5.3 installed at <strong>/usr/local/zend-5.3</strong>.</p>
<p>//symbolic link<br />
<strong>/usr/local/zend</strong> pointing to either /usr/local/zend-5.2 or /usr/local/zend-5.3.</p>
<p>The idea is to contain each installation completely so we can switch by making a simple symbolic link at /usr/local/zend. Many components of Zend Server is pointed at the base path /usr/local/zend so the easiest way is to keep this path working to avoid problems.</p>
<h2>Installation</h2>
<p>If you have one version of Zend Server CE already installed you will have to jump to the appropriate section and alter as needed. This installation guide will assume you have not installed Zend Server CE.</p>
<p><strong>Install Zend Server CE PHP 5.2</strong></p>
<p>1. Install normally. The installation package will install to /usr/local/zend.</p>
<p>2. Zend installs a start up include file at /etc/zce.rc. We need to copy this to the current 5.2 installation path. Were going to move the current /etc/zce.rc file inside to /usr/local/zend/etc/zce.rc to localize it to that installation path and the 5.2 version.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zce.rc <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>3. Move /usr/local/zend to /usr/local/zend-5.2.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend-<span style="color: #000000;">5.2</span></pre></div></div>

<p>We are now finished with installing Zend Server CE PHP 5.2.</p>
<p><strong>Install Zend Server CE PHP 5.3</strong><br />
(These steps are literally a copy of the above steps except this is for the 5.3 specific directory)</p>
<p>1. Install normally. The installation package will install to /usr/local/zend.</p>
<p>2. Zend installs a start up include file at /etc/zce.rc. We need to copy this to the current 5.3 installation path. Were going to move the /etc/zce.rc file inside to /usr/local/zend/etc/zce.rc to localize it to that installation path.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zce.rc <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>3. Move /usr/local/zend to /usr/local/zend-5.3.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend-<span style="color: #000000;">5.3</span></pre></div></div>

<p>We are now finished with installing Zend Server CE PHP 5.3.</p>
<p><strong>Finishing</strong></p>
<p>1. At this time /usr/local/zend directory still does not exist. Let&#8217;s create it by adding the symbolic link to point it to the version we want.</p>
<p><strong>Switch to 5.2</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend-<span style="color: #000000;">5.2</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend</pre></div></div>

<p><strong>Switch to 5.3</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend-<span style="color: #000000;">5.3</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend</pre></div></div>

<p>2. If you remember from above there was a start up include file at /etc/zce.rc. We need to add this back. We will add a symbolic link to point /etc/zce.rc to /usr/local/zend/etc/zce.rc.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zce.rc <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>zce.rc</pre></div></div>

<p>Note the awesomeness here. The zce.rc file is now pointing to the appropriate PHP version installation path now as we have a symbolic link for the main /usr/local/zend directory pointing to the specific version already!</p>
<p>3. I do not like Zend Server starting up at boot so I am going to remove the start up scripts at /Library/StartupItems/ZendServer_init. Note you can skip this step if you do want to leave the automatic boot feature on. At this current time of writing the start up scripts are the same for both PHP 5.2 and PHP 5.3, but that may change in the future.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>StartupItems<span style="color: #000000; font-weight: bold;">/</span>ZendServer_init</pre></div></div>

<p>You are now done with the installation!</p>
<h2>How to start /stop / switch Zend Server CE</h2>
<p><strong>Starting Zend Server CE</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>zendctl.sh start</pre></div></div>

<p><strong>Stopping Zend Server CE</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>zendctl.sh stop</pre></div></div>

<p><strong>Restarting Zend Server CE</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>zendctl.sh restart</pre></div></div>

<p><strong>Switching between Zend Server CE 5.2 &amp; 5.3</strong></p>
<p>1. If a current Zend Server instance has started already, STOP it first! Very important!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>zendctl.sh stop</pre></div></div>

<p>2. Remove the current /usr/local/zend link.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend</pre></div></div>

<p>3. Add the link back on and point to the version you want.</p>
<p><strong>Switch to 5.2</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend-<span style="color: #000000;">5.2</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend</pre></div></div>

<p><strong>Switch to 5.3</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend-<span style="color: #000000;">5.3</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend</pre></div></div>

<p>4. Start Zend Server again</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>zend<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>zendctl.sh start</pre></div></div>

<h2>Other Considerations</h2>
<p>* I wrote this guide with Zend Server CE 4.0.6. I can&#8217;t guarantee for future or past versions.</p>
<p>* Make sure you always work with the /usr/local/zend path only and never to the specific /usr/local/zend. e.g. /usr/local/zend/bin/pear</p>
<p>* It has been working for me great so far with no issues including PEAR, but may not be so smooth for you. Use at your own risk! Backup! Backup! Backup!</p>
<h2>Final Words</h2>
<p>Please let me know if this guide was helpful to you or not. Let me know if there are any issues / errors with this guide in the comments. Have Fun!</p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/THHjqriMWQc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/12/21/installing-both-zend-server-ce-php-5-2-php-5-3-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/12/21/installing-both-zend-server-ce-php-5-2-php-5-3-on-snow-leopard/</feedburner:origLink></item>
		<item>
		<title>Adobe Air HTML/Javascript Application Source Code Issues</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/NqgnOsqC0vc/</link>
		<comments>http://ireallylikesushi.com/blog/2009/12/09/adobe-air-htmljavascript-application-source-code-issues/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 03:29:50 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[meh]]></category>
		<category><![CDATA[Adobe Air]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=136</guid>
		<description><![CDATA[This is a topic that isn&#8217;t too popular for some reason&#8230; I have been working on a mini open source Adobe Air application, and out of curiosity I wanted to know how the source code of an HTML / Javascript Air application is &#8220;installed&#8221;. So running Mac OS X, I right clicked the application icon [...]]]></description>
			<content:encoded><![CDATA[<p>This is a topic that isn&#8217;t too popular for some reason&#8230; I have been working on a mini open source Adobe Air application, and out of curiosity I wanted to know how the source code of an HTML / Javascript Air application is &#8220;installed&#8221;. So running Mac OS X, I right clicked the application icon and chose the &#8220;Show Package Contents&#8221; option. I was surprised to see the all the application files / source code in it&#8217;s natural form. So I chose my main &#8220;application.html&#8221; file and added the text &#8220;&lt;div&gt;I just added this text! Ghetto!!!&lt;/div&gt;&#8221; and saved the file. I relaunched the application and what do you know&#8230;, the new changes are present.</p>
<p><img class="aligncenter size-full wp-image-138" title="Adobe Air Edited Application Screen Shot" src="http://ireallylikesushi.com/blog/wp-content/uploads/2009/12/Screen-shot-2009-12-09-at-10.22.46-PM.png" alt="Adobe Air Edited Application Screen Shot" width="470" height="400" /></p>
<p>I think it is obvious the issue at hand. I am suprisised to see the lack of attention this &#8220;weakness&#8221; of an HTML / Javascript Air application has. I am thinking more in terms of commercial applications. What happens if you have some activation code for your application? It looks like someone can remove it fairly easily&#8230;</p>
<p>In addition all your neat source code is 100% out in the open. I know nothing is 100% and in many other scenarios the source code can be decompiled&#8230;etc, but there is no attempt at all here and is pretty bad if I can edit the application instantly. Very cool for open source applications, WTF for commercial ones.</p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/NqgnOsqC0vc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/12/09/adobe-air-htmljavascript-application-source-code-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/12/09/adobe-air-htmljavascript-application-source-code-issues/</feedburner:origLink></item>
		<item>
		<title>My Zend Framework status updates</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/Qe_ERa0fP3I/</link>
		<comments>http://ireallylikesushi.com/blog/2009/10/05/my-zend-framework-status-updates/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 03:41:07 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Zend_Db_Mapper]]></category>
		<category><![CDATA[Zend_Entity]]></category>
		<category><![CDATA[Zend_Service_Digg]]></category>
		<category><![CDATA[Zend_Service_Tumblr]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=132</guid>
		<description><![CDATA[Zend_Service_Digg This component was originally proposed by Luke Crouch, but has been somewhat idle for a while. I&#8217;ve talked to Luke about helping out and have contacted Matthew Weier O&#8217;Phinney for approval of my addition. I have gotten thumbs up from both parties! I will be re-proposing the Zend_Service_Digg component to support the full Digg API [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Zend_Service_Digg</strong></p>
<p>This component was originally proposed by Luke Crouch, but has been somewhat idle for a while. I&#8217;ve talked to Luke about helping out and have contacted Matthew Weier O&#8217;Phinney for approval of my addition. I have gotten thumbs up from both parties! I will be re-proposing the Zend_Service_Digg component to support the full Digg API and will put it back up for community review soon!</p>
<p><a href="http://framework.zend.com/wiki/x/4ZU" target="_blank">Proposal Link</a></p>
<p><strong>Zend_Entity &amp; Zend_Db_Mapper</strong></p>
<p><strong><span style="font-weight: normal;">I will be trying my best to help out on this proposal. It is already in heavy and deep development by <a href="http://www.whitewashing.de/" target="_blank">Benjamin Eberlei</a>. I am trying to pick up as much as possible and will be diverting the majority of my attention here as I would really like to see this to be released. I am starting out a bit slow, but am aiming to knock out some real work soon.</span></strong></p>
<p><strong><span style="font-weight: normal;"><a href="http://framework.zend.com/wiki/x/OwCQ" target="_blank">Proposal Link</a></span></strong></p>
<p><strong>Zend_Service_Tumblr</strong></p>
<p>Still churning away on this! Nothing major to report yet.</p>
<p><a href="http://framework.zend.com/wiki/x/U4DU" target="_blank">Proposal Link</a></p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/Qe_ERa0fP3I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/10/05/my-zend-framework-status-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/10/05/my-zend-framework-status-updates/</feedburner:origLink></item>
		<item>
		<title>Support or document Zend_Application_Bootstrap usage in Zend_Test_PHPUnit_ControllerTestCase</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/Lz_ZInA_sjU/</link>
		<comments>http://ireallylikesushi.com/blog/2009/09/13/support-or-document-zend_application_bootstrap-usage-in-zend_test_phpunit_controllertestcase/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 20:20:28 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Zend_Application]]></category>
		<category><![CDATA[Zend_Framework]]></category>
		<category><![CDATA[Zend_Test]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=124</guid>
		<description><![CDATA[This is originally a post in the Zend Framework Issue Tracker as an improvement. This is simply a re-post to my own blog. You can view the issue tracker version here. I would like to see the &#8220;standard&#8221; Zend Framework bootstrapping method to be supported in Zend_Test_PHPUnit_ControllerTestCase. It is confusing and not obvious on how [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is originally a post in the Zend Framework Issue Tracker as an improvement. This is simply a  re-post to my own blog. You can view the issue tracker version <a href="http://framework.zend.com/issues/browse/ZF-7839">here</a>.</em></p>
<p>I would like to see the &#8220;standard&#8221; Zend Framework bootstrapping method to be supported in Zend_Test_PHPUnit_ControllerTestCase. It is confusing and not obvious on how to reuse your Zend_Application_Bootstrap when using the ControllerTestCase.</p>
<p>There are 2 ways that this can be done.</p>
<p><strong>&#8212;&#8212; First Method &#8212;&#8212;</strong></p>
<p>Document with code examples on how to use Zend_Application_Bootstrap_* in the Zend_Test_PHPUnit_ControllerTestCase manual. However one issue is that it feels a bit weird as you have to overwrite $this->_frontController manually yourself.</p>
<p><strong>&#8212; One Current Example &#8212;</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setUp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bootstrap</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'appBootstrap'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    parent<span style="color: #339933;">::</span><span style="color: #004000;">setUp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> appBootstrap<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">frontController</span>
         <span style="color: #339933;">-&gt;</span><span style="color: #004000;">registerPlugin</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Bugapp_Plugin_Initialize<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'development'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>&#8212; Using Zend_Application_Bootstrap Example &#8212;</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setUp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bootstrap</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'appBootstrap'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    parent<span style="color: #339933;">::</span><span style="color: #004000;">setUp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> appBootstrap<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>   
    <span style="color: #666666; font-style: italic;">// Create application, bootstrap, but don't RUN!</span>
    <span style="color: #000088;">$application</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Application<span style="color: #009900;">&#40;</span>
        APPLICATION_ENV<span style="color: #339933;">,</span>
        APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/configs/application.ini'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$bootstrap</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$application</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBootstrap</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$bootstrap</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bootstrap</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//note run() is not called!</span>
    <span style="color: #666666; font-style: italic;">//front controller now bootstrapped using whatever method you used (config, resource plugin...etc)</span>
    <span style="color: #666666; font-style: italic;">//Having $this-&gt;frontController and $this-&gt;_frontController may be hard to explain</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_frontController <span style="color: #339933;">=</span> <span style="color: #000088;">$bootstrap</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getResource</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'frontController'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see this is quite simple, but as I noted in the comment it may be confusing to explain that you have to overwrite $this->_frontController not $this->frontController.</p>
<p><strong>&#8212;&#8212; Second Method &#8212;&#8212;</strong></p>
<p>Actually supporting Zend_Application_Bootstrap in ControllerTestCase.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setUp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bootstrap</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Application<span style="color: #009900;">&#40;</span>
        APPLICATION_ENV<span style="color: #339933;">,</span>
        APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/configs/application.ini'</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    parent<span style="color: #339933;">::</span><span style="color: #004000;">setUp</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>if $this->bootstrap is set to an instance of Zend_Application then have the ControllerTestCase automatically call $bootstrap->bootstrap() for you. Future calls to $this->getFrontController() will retrieve the frontController from the bootstrap instead. </p>
<p>This is a simplified example obviously and I may have missed some details, but it seems obvious for some kind of support of the &#8220;standard&#8221; bootstrapping method. Bootstrapping can be very lengthy/complex and since the main goal is re-usability why would we want to have a completely different bootstrap method (or duplicated) for controller testing. I think this improvement will &#8220;sync&#8221; Zend_Test_PHPUnit_ControllerTestCase with the encouraged bootstrap method. This also puts to great use the separate production , development, testing ini settings document in the Zend_Application quick start. It becomes even more important with all the plugins with preDispatch details&#8230;etc. I think you get the point <img src='http://ireallylikesushi.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Thoughts, suggestions, hate messages are welcomed <img src='http://ireallylikesushi.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/Lz_ZInA_sjU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/09/13/support-or-document-zend_application_bootstrap-usage-in-zend_test_phpunit_controllertestcase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/09/13/support-or-document-zend_application_bootstrap-usage-in-zend_test_phpunit_controllertestcase/</feedburner:origLink></item>
		<item>
		<title>Excited for Doctrine 2.0</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/bCpn9mIRxRw/</link>
		<comments>http://ireallylikesushi.com/blog/2009/08/27/excited-for-doctrine-2-0/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 05:07:44 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=103</guid>
		<description><![CDATA[I&#8217;ve been keeping track of Doctrine 2.0 development lately, and I have to say I can&#8217;t wait for it come out even in alpha stage! The new approach in Doctrine 2.o is refreshing and what I&#8217;ve been looking for. What am I excited about? New Entity definition approach /** * @DoctrineEntity * @DoctrineTable(name=&#34;user&#34;) */ class [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been keeping track of <a href="http://www.doctrine-project.org/blog/tags/2-0" target="_blank">Doctrine 2.0</a> development lately, and I have to say I can&#8217;t wait for it come out even in alpha stage! The new approach in Doctrine 2.o is refreshing and what I&#8217;ve been looking for.</p>
<p>What am I excited about?</p>
<p><strong>New Entity definition approach</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * @DoctrineEntity
 * @DoctrineTable(name=&quot;user&quot;)
 */</span>
<span style="color: #000000; font-weight: bold;">class</span> User
<span style="color: #009900;">&#123;</span>
    <span style="color: #009933; font-style: italic;">/**
     * @DoctrineId
     * @DoctrineColumn(type=&quot;integer&quot;)
     * @DoctrineGeneratedValue(strategy=&quot;auto&quot;)
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$id</span><span style="color: #339933;">;</span>
    <span style="color: #009933; font-style: italic;">/**
     * @DoctrineColumn(type=&quot;varchar&quot;, length=255)
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$username</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In Doctrine 1.x you had to extend a base class Doctrine_Record. This new method does not impose on your existing entities.</p>
<p><strong>New Entity Manager</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CmsUser<span style="color: #339933;">;</span>
<span style="color: #000088;">$user</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>name <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Guilherme'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$user</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>status <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Slave'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$user</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>username <span style="color: #339933;">=</span> <span style="color: #0000ff;">'gblanco'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//EntityManager</span>
<span style="color: #000088;">$em</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>persist<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This is much cleaner than the previous approach and is now leaning towards an ORM that can be paired with a Domain Driven Design &#8220;style&#8221; of coding. I&#8217;ve been leaning towards this style and haven&#8217;t seen any ORM&#8217;s in PHP that can accomplish this well. This should make testing easier also!</p>
<p>In conclusion Doctrine 2.0 + Zend Framework = Awesome. I&#8217;m been working on a project that could really use Doctrine 2.0 NOW&#8230;</p>
<p><strong>Side Note</strong></p>
<p>There is another ORM called <a href="http://www.outlet-orm.org/site/" target="_blank">Outlet</a> that also implements the non imposing Entity definitions and a has an Entity Manager, but I can&#8217;t vouch for them personally. In addition I don&#8217;t know how well the code base is&#8230;</p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/bCpn9mIRxRw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/08/27/excited-for-doctrine-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/08/27/excited-for-doctrine-2-0/</feedburner:origLink></item>
		<item>
		<title>Zend_Service Contributor Guidelines</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/RLKxc64fVBI/</link>
		<comments>http://ireallylikesushi.com/blog/2009/08/24/zend_service-contributor-guidelines/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 20:52:30 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=84</guid>
		<description><![CDATA[I&#8217;ve been thinking that maybe a Zend_Service contributor guidelines wiki entry should be created. I think a contributors guide specific to this section would be beneficial. As the number of components grow in the Zend_Service_* section, it&#8217;d be nice if the components followed a ZF standard and had more consistency. While every web service implementation [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking that maybe a Zend_Service contributor guidelines wiki entry should be created. I think a contributors guide specific to this section would be beneficial. As the number of components grow in the Zend_Service_* section, it&#8217;d be nice if the components followed a ZF standard and had more consistency. While every web service implementation is indeed different, there are many aspects when building a ZF client that could become guidelines or &#8220;best practices&#8221;.  I think this may encourage future proposals and make it easier for others to write for Zend_Service_*. Please note that I don&#8217;t want to force a certain method, but merely promote a &#8220;good way&#8221; on doing things especially if it is backed by Zend and the community.</p>
<p>While I was working on the Zend_Service_Tumblr component, I&#8217;ve ran into some implementation specifics I wasn&#8217;t 100% sure of or if Zend had a suggested approach for the specific case already. I&#8217;ve used what I believe would be best for ZF when planning, but maybe it could be documented to help others.</p>
<p>Some examples:</p>
<h2>Validation</h2>
<p>Should the ZF client validate or let the web service do the validation? Maybe a mix?</p>
<p>Validating everything locally could be very time consuming and sometimes not possible if the validation rules aren&#8217;t stated in the web service documentation. At the same time validating everything remotely may not be acceptable under certain circumstances. Validating a number, length of a string..etc is easy, but validating an file upload may not be or even possible. I wanted to be somewhat consistent so which way should I go?</p>
<h2>Testability</h2>
<p>While there are tests for every Zend_Service component, there isn&#8217;t a normal guideline to on what approach to use or how testable it is. For example, if the component required a Zend_Http_Client instance, should the component be injected (optionally usually) in the constructor or using setters? If the Zend_Http_Client is instantiated inside the component, where should it happen?</p>
<p><strong>Constructor</strong><br />
(Zend_Service_Simpy)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #009933; font-style: italic;">/**
         * @see Zend_Service_Rest
         */</span>
        <span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Zend/Rest/Client.php'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">http</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Http_Client<span style="color: #339933;">;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">http</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setAuth</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>Lazy loading</strong><br />
(Zend_Service_Amazon)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getRestClient<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_rest <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_rest <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Rest_Client<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_rest<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In addition some of the ZF client&#8217;s don&#8217;t allow a setRestClient() or a setHttpClient method (this may be for good reason though) so you can&#8217;t  override the normal instances without extending the class and having your own implementation.  This is more nit picky, but it&#8217;d be nice if you were using many Zend_Service components to know offhand as it is consistent. This is also important when writing tests for your own application. You may want to inject a test Http adapter. Right now certain components require mock objects to do so while others have a simple injection method.</p>
<h2>How much of the API should be implemented?</h2>
<p>Should there be some guidelines on how &#8220;full&#8221; an API needs to be implemented? For example Zend_Service_Flickr only supports &#8220;fetching&#8221; methods and no creating or updating methods. I know this was created in the early days, but should partial implementations be accepted in cases like Flickr where it seems obvious to support more?</p>
<p>Thanks for reading and let me know if you agree or have any suggestions.</p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/RLKxc64fVBI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/08/24/zend_service-contributor-guidelines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/08/24/zend_service-contributor-guidelines/</feedburner:origLink></item>
		<item>
		<title>Zend_Service_Tumblr Accepted!</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/fbMTes7toX8/</link>
		<comments>http://ireallylikesushi.com/blog/2009/08/21/zend_service_tumblr-accepted/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 03:05:51 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=78</guid>
		<description><![CDATA[My first Zend Framework proposal was accepted! I received very encouraging words from Matthew Weier O&#8217;Phinney on the proposal acceptance: This proposal is accepted for immediate development in the standard incubator.The proposal is very well written, and shows plentiful use cases; I have absolutely no doubts on reading it that you have fully considered the [...]]]></description>
			<content:encoded><![CDATA[<p>My first <a href="http://framework.zend.com/wiki/x/U4DU" target="_blank">Zend Framework proposal</a> was accepted! I received very encouraging words from Matthew Weier O&#8217;Phinney on the proposal acceptance:</p>
<blockquote><p>This proposal is accepted for immediate development in the standard incubator.The proposal is <strong>very</strong> well written, and shows plentiful use cases; I have absolutely no doubts on reading it that you have fully considered the Tumblr API and will be fully exposing it for users. Thank you for taking the time to provide such good detail!</p></blockquote>
<p>Finishing the proposal should be a great learning experience on contributing to the Zend Framework and open source in general. Look for this component soon!</p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/fbMTes7toX8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/08/21/zend_service_tumblr-accepted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/08/21/zend_service_tumblr-accepted/</feedburner:origLink></item>
		<item>
		<title>FLOW3 – Dependency Injection</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/4ppsyb8AhVs/</link>
		<comments>http://ireallylikesushi.com/blog/2009/08/06/flow3-dependency-injection/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 00:03:26 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[flow3]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=53</guid>
		<description><![CDATA[FLOW3 has an awesome &#8220;full-blown&#8221; implementation of dependency injection. They have packaged this implementation into what they call their &#8220;Object Framework&#8221;. I love how complete it is and it seems to be well thought through. The documentation is very educational with many code examples. Well worth the read (link below). It is by far my [...]]]></description>
			<content:encoded><![CDATA[<p>FLOW3 has an awesome &#8220;full-blown&#8221; implementation of dependency injection. They have packaged this implementation into what they call their &#8220;Object Framework&#8221;. I love how complete it is and it seems to be well thought through. The documentation is very educational with many code examples. Well worth the read (link below).</p>
<p>It is by far my favorite DI implementation and it&#8217;s built for PHP 5.3 (Note: FLOW3 is still in alpha stage). While not impossible (as far as I know) I wish I could use the Object Framework independently into existing projects especially with the Zend Framework &#8220;efficiently&#8221;, kind of like how the <a title="Symfony Dependency Injection" href="http://components.symfony-project.org/dependency-injection/" target="_blank">Symfony dependency injection</a> implementation is.</p>
<p>Link: <a title="FLOW3 - Object Framework" href="http://flow3.typo3.org/documentation/reference/flow3.objectframework/" target="_blank">FLOW3 &#8211; Object Framework</a></p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/4ppsyb8AhVs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/08/06/flow3-dependency-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/08/06/flow3-dependency-injection/</feedburner:origLink></item>
		<item>
		<title>Zend_Service_Tumblr – Ready for Recommendation</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/og5CxrDVPm8/</link>
		<comments>http://ireallylikesushi.com/blog/2009/07/28/zend_service_tumblr-ready-for-recommendation/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 04:29:17 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[proposal]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=46</guid>
		<description><![CDATA[I&#8217;ve made some final changes and submitted my Zend_Service_Tumblr component proposal in for recommendation. It has been a month now since its been ready for review. I&#8217;ve received no feedback on it unfortunately. Check it out now if your interested and you haven&#8217;t seen it. Proposal Link]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made some final changes and submitted my Zend_Service_Tumblr component proposal in for recommendation. It has been a month now since its been ready for review. I&#8217;ve received no feedback on it unfortunately.</p>
<p>Check it out now if your interested and you haven&#8217;t seen it.</p>
<p><a title="Zend_Service_Tumblr proposal" href="http://framework.zend.com/wiki/x/U4DU" target="_blank">Proposal Link</a></p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/og5CxrDVPm8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/07/28/zend_service_tumblr-ready-for-recommendation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/07/28/zend_service_tumblr-ready-for-recommendation/</feedburner:origLink></item>
		<item>
		<title>Adding HTML to a Zend_Form_Element label</title>
		<link>http://feedproxy.google.com/~r/ireallylikesushi/~3/Wr4B0jmAdk4/</link>
		<comments>http://ireallylikesushi.com/blog/2009/07/23/adding-html-to-a-zend_form_element-label/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 21:24:15 +0000</pubDate>
		<dc:creator>Duo</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[decorator]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Zend_Form]]></category>

		<guid isPermaLink="false">http://ireallylikesushi.com/blog/?p=30</guid>
		<description><![CDATA[I wanted to create a checkbox with a label that included a link to an &#8220;agreement&#8221; notice. So I used this: $checkbox-&#62;setLabel('I agree to the &#60;a href="/i/copyright"&#62;Copyright&#60;/a&#62;'); Problem with this is that it outputs the escaped version: What I needed was: This was a suprisingly lengthy find. After some time I stumbled upon a post [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to create a checkbox with a label that included a link to an &#8220;agreement&#8221; notice.</p>
<p>So I used this:<br />
<code>$checkbox-&gt;setLabel('I agree to the &lt;a href="/i/copyright"&gt;Copyright&lt;/a&gt;');</code></p>
<p>Problem with this is that it outputs the escaped version:</p>
<p><img class="alignnone size-full wp-image-33" title="Escaped element output" src="http://ireallylikesushi.com/blog/wp-content/uploads/2009/07/Picture-79.png" alt="Escaped element output" width="310" height="40" /></p>
<p>What I needed was:</p>
<p><img class="alignnone size-full wp-image-34" title="Label with HTML" src="http://ireallylikesushi.com/blog/wp-content/uploads/2009/07/Picture-80.png" alt="Label with HTML" width="148" height="39" /></p>
<p>This was a suprisingly lengthy find. After some time I stumbled upon a post by Stefan Koopmanschap <a title="Adding a link to Zend Form" href="http://www.leftontheweb.com/message/Adding_a_link_to_a_form_element_with_Zend_Framework" target="_blank">here</a>.</p>
<p>His solution was to use:<br />
<code>$element-&gt;setDecorators(array(array('Label', array('escape' =&gt; false))));</code></p>
<p>This worked for the HTML part as my link now appeared, but I didn&#8217;t see my checkbox, just the label. So looking at the method name I assumed it overwrote the default decorators and found out that I was correct. The easy way to get the link in while maintaining the default decorators is to simply add the decorator.</p>
<p>Example<br />
<code>$checkbox->addDecorator('Label', array('escape' => false));</code></p>
<p>As simple as this is it took some time to figure out. While the Zend Framework documentation is pretty awesome it doesn&#8217;t cover all use cases. Hope this helps someone.</p>
<img src="http://feeds.feedburner.com/~r/ireallylikesushi/~4/Wr4B0jmAdk4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ireallylikesushi.com/blog/2009/07/23/adding-html-to-a-zend_form_element-label/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ireallylikesushi.com/blog/2009/07/23/adding-html-to-a-zend_form_element-label/</feedburner:origLink></item>
	</channel>
</rss>

