<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Rob Allen&#039;s DevNotes</title>
	<atom:link href="http://akrabat.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com</link>
	<description>Developing PHP software in the Real World, by Rob Allen</description>
	<lastBuildDate>Wed, 01 Sep 2010 14:33:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Day Camp for Developers virtual conference</title>
		<link>http://akrabat.com/conferences/day-camp-for-developers-virtual-conference/</link>
		<comments>http://akrabat.com/conferences/day-camp-for-developers-virtual-conference/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 07:32:15 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1183</guid>
		<description><![CDATA[My friend Cal Evans is putting on a virtual conference called Day Camp 4 Developers. The most interesting thing about this conference is that it is about the "soft skills" that you need as a developer. There are many conferences that deal withe the technical skills improvements that you need, but less that handle the [...]]]></description>
			<content:encoded><![CDATA[<p>My friend Cal Evans is putting on a virtual conference called <a href="http://daycamp4developers.com/">Day Camp 4 Developers</a>. The most interesting thing about this conference is that it is about the "soft skills" that you need as a developer. There are many conferences that deal withe the technical skills improvements that you need, but less that handle the rest of your job, so this piqued my interest.</p>
<p>It's a one day tech-agnostic conference containing 5 sessions and all you need is an Internet connection. Good choice of <a href="http://daycamp4developers.com/schedule/">speakers</a> too: Josh Holmes, Elizabeth Naramore, Scott Gordon, Brian Prince and Lorna Mitchell.</p>
<h3>Details</h3>
<blockquote><p>
<strong>Date</strong>: Saturday, November 6th<br />
<strong>Price</strong>: $35 per person ($30 in groups of 10 or more)<br />
<strong>Where</strong>: On-Line (gotowebinar.com)
</p></blockquote>
<p>What's also cool is that all sessions will be recorded and available for you to review at your leisure. Of course, if you're busy that day, then you can buy a ticket and get the videos anyway to listen to at a later date.  Apparently, you'll be able to buy the session recordings after the event, but at a price premium, so probaly worth just getting a ticket and not (virtually!) turning up on the day :)</p>
<p>You can <a href="http://www.eventbrite.com/event/811017776/DayCamp4Developers/3344367840">buy a ticket directly</a> via eventbrite now and be sure of your place!</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/conferences/day-camp-for-developers-virtual-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Redirector action helper</title>
		<link>http://akrabat.com/zend-framework/the-redirector-action-helper/</link>
		<comments>http://akrabat.com/zend-framework/the-redirector-action-helper/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 07:08:13 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1171</guid>
		<description><![CDATA[Following on from the discussion on the FlashMessenger action helper, I thought I'd also cover another supplied helper: Redirector. Redirector does what it says on the tin and redirects the user to another page. I mostly use this when coming back from filling a form in, so that the user is then redirected to another [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from the discussion on the <a href="http://akrabat.com/zend-framework/zend-frameworks-flash-messenger-action-helper/">FlashMessenger action helper</a>, I thought I'd also cover another supplied helper: <a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelpers.redirector">Redirector</a>.</p>
<p>Redirector does what it says on the tin and redirects the user to another page. I mostly use this when coming back from filling a form in, so that the user is then redirected to another page. In admin systems, this is usually a list page. On front end websites, this is usually a thank you page. Though for log-in forms, I tend to try and return the user to where they were going!</p>
<p>It's used in a controller action method like this:</p>
<pre class="phpcode"><span style="color: #0000BB">$urlOptions&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">'controller'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">'index'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'action'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">'index'</span><span style="color: #007700">);
</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_helper</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">redirector</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">gotoRoute</span><span style="color: #007700">(</span><span style="color: #0000BB">$urlOptions</span><span style="color: #007700">);</span>
</span></code></pre>
<p><tt>gotoRoute()</tt> takes the same set of parameters are the <tt>url()</tt> view helper which is not a surprise as they both proxy through to the Front Controller's router object. It's handy though as one you know one, you know the other :)</p>
<p>If you are using the default route, then you can use <tt>gotoSimple()</tt>. For example to redirect to the news controller's list action, you would do:</p>
<pre class="phpcode"><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_helper</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">redirector</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">gotoSimple</span><span style="color: #007700">(</span><span style="color: #DD0000">'list'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'news'</span><span style="color: #007700">);</span>
</span></code></pre>
<p>The <tt>gotoSimple()</tt> method signature is:</p>
<pre class="phpcode"><span style="color: #0000BB">gotoSimple</span><span style="color: #007700">(</span><span style="color: #0000BB">$action</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$controller&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$module&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">,&nbsp;array&nbsp;</span><span style="color: #0000BB">$params&nbsp;</span><span style="color: #007700">=&nbsp;array());</span>
</span></code></pre>
<p>As you can see, it provides defaults for the controller and module and params parameters so you only need to set them if you need to. This works well for admin system as I tend to be redirecting within the same controller (from the edit or delete action to index, usually).</p>
<p>You can also use the Redirector with an absolute URL, by using the <tt>gotoUrl()</tt> method:</p>
<pre class="phpcode"><span style="color: #0000BB">$url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'http://www.akrabat.com'</span><span style="color: #007700">;
</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_helper</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">redirector</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">gotoUrl</span><span style="color: #007700">(</span><span style="color: #0000BB">$url</span><span style="color: #007700">);</span>
</span></code></pre>
<p>I tend to use this one much less frequently - so infrequently, that I can't think of a use-case off the top of my head :)</p>
<p>By default, Redirector sets a 302 status code, however you can also set a 301 if you want to:</p>
<pre class="phpcode"><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_helpers</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">redirector</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setCode</span><span style="color: #007700">(</span><span style="color: #0000BB">301</span><span style="color: #007700">);</span>
</span></code></pre>
<p>There are a few other options that can be set like <tt>setExit()</tt> and <tt>setUseAbsoluteUri()</tt>, but to be honest, I don't think I've ever used them!</p>
<p>I find that I use Redirector fairly frequently as its <tt>gotoRoute()</tt> uses the same parameters as <tt>url()</tt> which makes it easy to remember how to use it. Like <tt>url()</tt>, it also benefits from remembering which route was used to get you to the current page and reuses that when creating the next one which is handy. </p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/zend-framework/the-redirector-action-helper/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Zend Framework&#039;s Flash Messenger action helper</title>
		<link>http://akrabat.com/zend-framework/zend-frameworks-flash-messenger-action-helper/</link>
		<comments>http://akrabat.com/zend-framework/zend-frameworks-flash-messenger-action-helper/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 08:10:51 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1152</guid>
		<description><![CDATA[I've talked about Zend Framework's action helpers before, but haven't covered any of the action helpers that are supplied with Zend Framework. FlashMessenger is a helper that allows you to store messages between requests. The most common use I have for it is for a "saved" message after doing an edit of an item that [...]]]></description>
			<content:encoded><![CDATA[<p>I've talked about Zend Framework's action helpers <a href="http://akrabat.com/zend-framework/hooks-in-action-helpers/">before</a>, but haven't covered any of the action helpers that are supplied with Zend Framework.</p>
<p><a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelpers.flashmessenger">FlashMessenger</a> is a helper that allows you to store messages between requests. The most common use I have for it is for a "saved" message after doing an edit of an item that then redirects back to a list.</p>
<p>This is how it's used:</p>
<h3>Storing a message</h3>
<p>Storing to the FlashMessenger is easy. This is my typical usage within an action controller:</p>
<pre class="phpcode"><span style="color: #0000BB">
$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_helper</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">flashMessenger</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addMessage</span><span style="color: #007700">(</span><span style="color: #DD0000">'Task&nbsp;saved'</span><span style="color: #007700">);
</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_helper</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">redirector</span><span style="color: #007700">(</span><span style="color: #DD0000">'index'</span><span style="color: #007700">);
</span>
</span></code></pre>
<p>This code adds the message "Task saved" to the FlashMessenger and then redirects the user the index action, which in this case is a list of tasks. As should be obvious from the name of the method, you can add multiple messages and they will all be stored for retrieval after the next redirect.</p>
<p>The FlashMessenger will store the message that you've added for one <em>hop</em>, or number of requests. This means that the message will be available for retrieval on the next request, but unavailable on the request afterwards. This is very useful and it means that if someone refreshes the task list by hitting F5, then the "Task saved" message does not reappear.</p>
<h3>Retrieving the stored messages</h3>
<p>Retrieving the stored messages is similarly simple:</p>
<pre class="phpcode"><span style="color: #0000BB">
$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">view</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">messages&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_helper</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">flashMessenger</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getMessages</span><span style="color: #007700">();
</span>
</span></code></pre>
<p>This will create an array of messages in your view object which you can then loop over in your view script:</p>
<pre class="phpcode">
<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">count</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">messages</span><span style="color: #007700">))&nbsp;:&nbsp;</span><span style="color: #0000BB">?&gt;
</span>&lt;ul&nbsp;id="messages"&gt;
<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">foreach&nbsp;(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">messages&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$message</span><span style="color: #007700">)&nbsp;:&nbsp;</span><span style="color: #0000BB">?&gt;
</span>&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape</span><span style="color: #007700">(</span><span style="color: #0000BB">$message</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">?&gt;</span>&lt;/li&gt;
<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">endforeach;&nbsp;</span><span style="color: #0000BB">?&gt;
</span>&lt;/div&gt;
<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">endif;&nbsp;</span><span style="color: #0000BB">?&gt;
</span>
</span></code></pre>
<p>and that's all there is to the FlashMessenger.</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/zend-framework/zend-frameworks-flash-messenger-action-helper/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Speaking at PHPNW 10</title>
		<link>http://akrabat.com/conferences/speaking-at-phpnw-10/</link>
		<comments>http://akrabat.com/conferences/speaking-at-phpnw-10/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 12:25:16 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1144</guid>
		<description><![CDATA[The PHPNW conference is coming to Manchester again this year on the 9th October 2010 and I'm going to be speaking! With a nod to the future, I'm going to be talking about Zend Framework 2.0. I'll be talking about why there will be a ZF2 and what's going to be coming up with the [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://conference.phpnw.org.uk/">PHPNW conference</a> is coming to Manchester again this year on the 9th October 2010 and I'm going to be speaking!</p>
<p>With a nod to the future, I'm going to be talking about <a href="http://conference.phpnw.org.uk/phpnw10/zend-framework-2-0-is-coming">Zend Framework 2.0</a>. I'll be talking about why there will be a ZF2 and what's going to be coming up with the release.</p>
<p>PHPNW is a great conference and this year has expanded to three tracks! It's only &pound;58 too if you <a href="http://conference.phpnw.org.uk/phpnw10/registration/">book before 4th September</a>. There's lot of ZF content too along with plenty of other great talks covering all aspects of PHP development.</p>
<p>If you are in the UK this October, make sure you come along!</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/conferences/speaking-at-phpnw-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Zend_Auth tutorial</title>
		<link>http://akrabat.com/zend-framework/new-zend-auth-tutorial/</link>
		<comments>http://akrabat.com/zend-framework/new-zend-auth-tutorial/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 07:38:50 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1136</guid>
		<description><![CDATA[After too many months of neglect, I have completely rewritten my Zend_Auth tutorial so that it is compatible with Zend Framework 1.10! As an experiment, I have written it directly in HTML, rather than PDF as before and cover the login form along with the login controller code required to authenticate a user using a [...]]]></description>
			<content:encoded><![CDATA[<p>After too many months of neglect, I have completely rewritten my <a href="/zend-auth-tutorial">Zend_Auth tutorial</a> so that it is compatible with Zend Framework 1.10!</p>
<p>As an experiment, I have written it directly in HTML, rather than PDF as before and cover the login form along with the login controller code required to authenticate a user using a database table. For good measure, I've included logging out and a view helper to show how to access the logged in user's details.</p>
<p>The full source code is also available, if you don't want to type it in :)</p>
<p>I hope you find it useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/zend-framework/new-zend-auth-tutorial/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Akrabat_Db_Schema_Manager: table prefix support</title>
		<link>http://akrabat.com/zend-framework/akrabat_db_schema_manager-table-prefix-support/</link>
		<comments>http://akrabat.com/zend-framework/akrabat_db_schema_manager-table-prefix-support/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 10:39:00 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1072</guid>
		<description><![CDATA[I've updated Akrabat_Db_Schema_Manager so that it now supports table prefixes. It uses the application.ini key of resources.db.table_prefix as I couldn't think of a better one :) and then uses that for the schema_version table's name and also makes it available in your change objects. For example, if application.ini contains resources.db.table_prefix = "myapp", then the manager [...]]]></description>
			<content:encoded><![CDATA[<p>I've updated <a href="http://github.com/akrabat/Akrabat">Akrabat_Db_Schema_Manager</a> so that it now supports table prefixes.</p>
<p>It uses the application.ini key of <tt>resources.db.table_prefix</tt> as I couldn't think of a better one :) and then uses that for the <tt>schema_version</tt> table's name and also makes it available in your change objects.</p>
<p>For example, if application.ini contains <tt>resources.db.table_prefix = "myapp"</tt>, then the manager will create the table <tt>myapp_schema_version</tt> to store the current version of the schema. In your change classes, you can then do this:</p>
<p><strong>001-Users.php:</strong></p>
<pre class="phpcode"><span style="color: #0000BB">
&nbsp;</span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">Users&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">Akrabat_Db_Schema_AbstractChange&nbsp;
&nbsp;</span><span style="color: #007700">{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">up</span><span style="color: #007700">()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$tableName&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_tablePrefix&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'users'</span><span style="color: #007700">;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$sql&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CREATE&nbsp;TABLE&nbsp;IF&nbsp;NOT&nbsp;EXISTS&nbsp;</span><span style="color: #0000BB">$tableName</span><span style="color: #DD0000">&nbsp;(
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;int(11)&nbsp;NOT&nbsp;NULL&nbsp;AUTO_INCREMENT,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username&nbsp;varchar(50)&nbsp;NOT&nbsp;NULL,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;password&nbsp;varchar(75)&nbsp;NOT&nbsp;NULL,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;role&nbsp;varchar(200)&nbsp;NOT&nbsp;NULL&nbsp;DEFAULT&nbsp;'user',
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PRIMARY&nbsp;KEY&nbsp;(id)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;ENGINE=InnoDB&nbsp;DEFAULT&nbsp;CHARSET=utf8;"</span><span style="color: #007700">;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #0000BB">$sql</span><span style="color: #007700">);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$data&nbsp;</span><span style="color: #007700">=&nbsp;array();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$data</span><span style="color: #007700">[</span><span style="color: #DD0000">'username'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'admin'</span><span style="color: #007700">;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$data</span><span style="color: #007700">[</span><span style="color: #DD0000">'password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">sha1</span><span style="color: #007700">(</span><span style="color: #DD0000">'password'</span><span style="color: #007700">);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$data</span><span style="color: #007700">[</span><span style="color: #DD0000">'role'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'admin'</span><span style="color: #007700">;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert</span><span style="color: #007700">(</span><span style="color: #0000BB">$tableName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$data</span><span style="color: #007700">);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">down</span><span style="color: #007700">()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$tableName&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_tablePrefix&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'users'</span><span style="color: #007700">;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$sql</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"DROP&nbsp;TABLE&nbsp;IF&nbsp;EXISTS&nbsp;</span><span style="color: #0000BB">$tableName</span><span style="color: #DD0000">"</span><span style="color: #007700">;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">_db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #0000BB">$sql</span><span style="color: #007700">);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;}
</span>
</span></code></pre>
<p>which will create a table called <tt>myapp_users</tt>. Note that you are responsible for using the prefix property as the change classes cannot enforce what you do within the <tt>up()</tt> and <tt>down()</tt> methods. It also follows that you'll have to ensure that your models also use the correct prefix.</p>
<p>I have also made a change to the provider (<tt>Akrabat_Tool_DatabaseSchemaProvider</tt>) so that it loads the correct application.ini file based on the data in the project's profile. This shouldn't affect anyone using Akrabat_Db_Schema_Manager, except that we no longer define <tt>APPLICATION_ENV</tt> and <tt>APPLICATION_PATH</tt> for you.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/zend-framework/akrabat_db_schema_manager-table-prefix-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Dutch PHP conference 2010</title>
		<link>http://akrabat.com/conferences/dpc-2010/</link>
		<comments>http://akrabat.com/conferences/dpc-2010/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 14:21:13 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1066</guid>
		<description><![CDATA[This year I was invited to speak at DPC 2010 which was a great conference. I've published to Flickr, my complete set of photos from DPC 10. Arriving on Wednesday, the day before the conference, I managed to get to meet up with my friend Juliette, along with a some of the other speakers for [...]]]></description>
			<content:encoded><![CDATA[<p>This year I was invited to speak at <a href="www.phpconference.nl/2010">DPC 2010</a> which was a great conference. I've published to Flickr, my complete set of <a href="http://www.flickr.com/photos/akrabat/sets/72157624271929314/">photos from DPC 10</a>.</p>
<p>Arriving on Wednesday, the day before the conference, I managed to get to meet up with my friend Juliette, along with a some of the other speakers for a barbeque which was a lot of fun. We ate, we drank (lots) and possibly this pose by Chris was the most surreal picture I took that evening!</p>
<p><a href="http://www.flickr.com/photos/86569608@N00/4699593674" title="View 'I cannot even begin to think of a caption' on Flickr.com"><img border="0"width=""alt="I cannot even begin to think of a caption"src="http://farm5.static.flickr.com/4046/4699593674_09d34e5fac.jpg"height=""/></a></p>
<p>On tutorial day, I gave a <a href="http://joind.in/1526">Zend Framework tutorial</a> with <a href="http://weierophinney.net/matthew/">Matthew Weier O'Phinney</a> which seemed to go down quite well. We took a different approach this year to the previous ones that Matthew has given in that we talked about different application patterns and components that you can use in your ZF application; rather going through building an application from scratch. This had the benefit that we could talk about stuff that we wouldn't have got to normally. There were some other excellent tutorials that I was sorry to miss; I'm not quite sure how the attendees were able to make up their minds!</p>
<p>The conference was opened by <a href="http://www.lornajane.net">Lorna</a> and then <a href="http://www.two-sdg.demon.co.uk/curbralan/kevlin.html">Kevlin</a> gave the opening keynote speaking about <a href="http://www.amazon.co.uk/gp/product/0596809484?ie=UTF8&#038;tag=zendframinact-21">97 things every programmer should know</a>. This was an excellent keynote which fired us up for the day. In the morning, I gave my <a href="http://joind.in/1551">presentation on Zend_Form</a> which I didn't feel came across quite as well as I could have done. I should probably revisit the content and pack some other bits in. This talk clearly showed the difficulties of aiming a presentation at the audience's level as I had some people there who had never used Zend_Form and others who knew it and were looking for more nitty-gritty details. Maybe I didn't set their expectations correctly at the start. </p>
<p>There were many other excellent presentations on the first day an I managed to catch <a href="http://schlueters.de/blog/">Johannes</a>' talk, '<a href="http://joind.in/talk/view/1543">Under PHP's hood</a>' about what goes on within the PHP engine. An excellent talk with content that I highly recommend every PHP developer learns. I finished the day listening to <a href="http://blog.calevans.com/">Cal</a> talk about <a href="http://joind.in/talk/view/1652">Flex</a> and whilst he hasn't convinced me to go that route, I know actually know a little about what it actually is!</p>
<p>In the evening, I had dinner with the other speakers and then we went to the conference social hosted by <a href="http://www.ibuildings.com/">Ibuildings</a> and <a href="http://github.com/">github</a>. This was very well attended and I had several good conversations with people.</p>
<p><a href="http://www.flickr.com/photos/86569608@N00/4699597290" title="View 'Social' on Flickr.com"><img border="0"width=""alt="Social"src="http://farm5.static.flickr.com/4070/4699597290_0bed999dd8.jpg"height=""/></a></p>
<p>The second day of the conference started with a keynote by <a href="http://www.shiflett.org">Chris Shifflet</a> about <a href="http://">Security patterns</a>. I had already seen this talk and it was just as fascinating seeing it again. Definitely lots to think about. I gave my last talk of the conference immediately after the keynote and spoke on <a href="http://">Deployment</a>. I felt that this talk went well and that most of the audience got something out of it. </p>
<p>In a break from technical content, I went to see <a href="http://naramore.net/blog/">Elizabeth</a>'s talk on <a href="http://joind.in/talk/view/1558">technical writing</a>. Whilst I consider myself competent, I learnt lots and managed to not embarrass myself too much during the interactive section when I was volunteered (thanks Chris!) to go up and help Elizabeth illustrate a point. I also managed to drop in on the uncon and see <a href="http://dev.juokaz.com/">Juozas</a> and <a href="http://www.whitewashing.de/">Ben</a> talk about <a href="http://joind.in/talk/view/1769">Doctrine 2</a>, which seems to be considerably better than D1. The conference ended with a panel of leading lights in the PHP world talking about PHP and where it's headed.</p>
<p><a href="http://www.flickr.com/photos/86569608@N00/4699598762" title="View 'Closing keynote panel' on Flickr.com"><img border="0"width=""alt="Closing keynote panel"src="http://farm5.static.flickr.com/4032/4699598762_ef5472a8c5.jpg"height=""/></a></p>
<p>After conference ended, I went with a number of other people to a pancake restaurant and had an excellent meal, followed by a drink (or two!) with friends in the hotel bar. I had joked earlier in the evening that the bar bill would end up being paid by whomever was left standing at closing time... <a href="http://mgdm.net/">mdgm</a> and myself had that honour :)</p>
<p>Again, DPC 2010 was a great conference and I want to thank <a href="http://www.lornajane.net/">Lorna</a> and the DPC crew again for inviting me.</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/conferences/dpc-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Community Review Team for Zend Framework</title>
		<link>http://akrabat.com/zend-framework/community-review-team-for-zend-framework/</link>
		<comments>http://akrabat.com/zend-framework/community-review-team-for-zend-framework/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 06:02:09 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1041</guid>
		<description><![CDATA[On the ZF mailing lists, there's been a discussion on creating a community team with a follow-up by Matthew. I was going to write up a little about it as I'm one of the volunteers on the team. However, Pádraic beat me to it and I don't think I could have written it any better, [...]]]></description>
			<content:encoded><![CDATA[<p>On the ZF mailing lists, there's been a <a href="http://zend-framework-community.634137.n4.nabble.com/Community-Review-Team-td2242135.html#a2242135">discussion</a> on creating a community team with a <a href="http://zend-framework-community.634137.n4.nabble.com/Follow-up-regarding-community-review-team-td2246260.html#a2246260">follow-up</a> by <a href="http://weierophinney.net/matthew/">Matthew</a>.</p>
<p>I was going to write up a little about it as I'm one of the volunteers on the team. However, <a href="http://blog.astrumfutura.com/">Pádraic</a> beat me to it and I don't think I could have written it any better, so go and <a href="http://blog.astrumfutura.com/archives/429-Zend-Framework-Community-Review-Team.html">read his write-up</a> instead!</p>
<p>The CR Team at the moment is:</p>
<ul>
<li>Rob Allen (Akrabat)</li>
<li>Pádraic Brady (PadraicB)</li>
<li>Steven Brown</li>
<li>Shaun Farrell (farrelley)</li>
<li>Pieter Kokx (kokx)</li>
<li>Dolf Schimmel (Freeaqingme)</li>
<li>Ben Scholzen (DASPRiD)</li>
</ul>
<p>(alphabetical order has always suited me!)</p>
<p>We all accept email and can be found on irc in #zftalk.dev (freenode). Most are on Twitter too. Feel free to contact any of us about anything to do with contributing to Zend Framework and we'll find someone to help you!</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/zend-framework/community-review-team-for-zend-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MongoDB on OS X with the stock PHP installation</title>
		<link>http://akrabat.com/php/mongodb-on-os-x-with-the-stock-php-installation/</link>
		<comments>http://akrabat.com/php/mongodb-on-os-x-with-the-stock-php-installation/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 12:47:54 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1038</guid>
		<description><![CDATA[MongoDB was mentioned a few times at tek and I said that I wanted to have a look at. Travis' article, MongoDB: A first look, came out a few days ago and piqued my interest further. Then Matthew sent me some source code that requires it. The stage was set for getting MongoDB working on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mongodb.org/">MongoDB</a> was mentioned a few times at <a href="http://tek.phparch.com/">tek</a> and I said that I wanted to have a look at.</p>
<p>Travis' article, <a href="http://www.travisswicegood.com/index.php/2010/05/31/mongodb-a-first-look">MongoDB: A first look</a>, came out a few days ago and piqued my interest further. Then <a href="http://weierophinney.net/matthew/">Matthew</a> sent me some source code that requires it. The stage was set for getting MongoDB working on my Mac.</p>
<h3>MongoDB</h3>
<p>I use <a href="http://github.com/mxcl/homebrew">homebrew</a> as a package manager for installing open source bits and bobs like couchdb, git, and hg. Installing MongoDB was simply a case of:</p>
<pre>brew install mongodb</pre>
<p>Once, installed there's a convenient LaunchAgent plist supplied so that mongodb starts with the computer:</p>
<pre>cp /usr/local/Cellar/mongodb/1.4.3-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents
launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist</pre>
<p>And at this point, MongoDB is installed on your Mac and Travis' article and the <a href="http://www.mongodb.org/display/DOCS/Tutorial">tutorial</a> work!</p>
<h3>The Mongo PHP extension</h3>
<p>If you've been following along here for a while, then you'll know that I use the <a href="/phposx">stock PHP that comes with Mac OS X</a>. I've been very happy with it so far and installed <a href="http://xdebug.org/">Xdebug</a> was easy enough using pecl, so I was hopeful that the mongo extension would be equally simple.</p>
<p>Turns out that it is!</p>
<pre>pecl install mongo</pre>
<p>Compiles the extension with no problems.</p>
<p>To add it to your PHP install, edit php.ini and add:</p>
<pre>extension=mongo.so</pre>
<p>A quick <tt>sudo apachectl restart</tt> and phpinfo() shows this:</p>
<p><img src="http://akrabat.com/wp-content/uploads/2010-06-mongodb_phpinfo.png" alt="MongoDB in phpinfo" border="0" width="450" height="218" /></p>
<p>All done! You can now get at MongoDB from your PHP scripts.</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/php/mongodb-on-os-x-with-the-stock-php-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tek.X recap</title>
		<link>http://akrabat.com/conferences/tek-x-recap/</link>
		<comments>http://akrabat.com/conferences/tek-x-recap/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 06:46:15 +0000</pubDate>
		<dc:creator>Rob...</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://akrabat.com/?p=1023</guid>
		<description><![CDATA[TekX (pronounced Tek-Ten) has finished and we've all gone back to our respective daily lives. I had a blast and learnt a thing or two as well... I've also been a little busy, which is why this post is "late". The week started on Saturday when I flew to Chicago from Manchester. Rather helpfully, tek [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tek.phparch.com/">TekX</a> (pronounced Tek-Ten) has finished and we've all gone back to our respective daily lives.  I had a blast and learnt a thing or two as well... I've also been a little busy, which is why this post is "late".</p>
<p>The week started on Saturday when I flew to Chicago from Manchester. Rather helpfully, tek was held at a hotel close enough to the airport, that the hotel had a free shuttle. As a tip for next year, you need to phone the hotel to come and collect you if you don't land at the terminal next to the train station.</p>
<p>On Sunday, Lorna, Derick and myself went to Chicago city centre; apparently, this is known as "downtown". We were intending to do a river boat trip, however that was all booked up, so we ended up grabbing lunch; having a look around <a href="http://www.millenniumpark.org/generalinformation/">Millennium Park</a> and then doing a <a href="http://caf.architecture.org/Page.aspx?pid=672">walking tour</a> with the Chicago Architecture Foundation. This turned out to be an excellent tour. The lady was extremely knowledgeable and shared her knowledge freely. it was a very enjoyable afternoon and I feel that I know much more about Chicago's history now. </p>
<p><a href="http://www.flickr.com/photos/86569608@N00/4639298441"><img border="0"width=""alt="Chicago's skyline reflected in 'The Bean'"src="http://farm5.static.flickr.com/4014/4639298441_148e2f891c.jpg"height=""/></a></p>
<p>I ended up working much more than I expected over the week, however, I did manage to make nearly all the sessions I wanted to. Due to a scheduling conflict, I missed <a href="http://twitter.com/kchodorow">Kristina</a>'s tutorial on MongoDB as I was giving a <a href="http://joind.in/talk/view/1562">Zend Framework tutorial</a> at the same time! My tutorial seemed to be appreciated and I hope that those attending learnt something new. It was an introduction to Zend Framework, starting from first principles; in Amsterdam next week, at the Dutch PHP Conference, Matthew and I will be doing an all-day tutorial covering the next level of Zend Framework usage.</p>
<p><a href="http://www.joshholmes.com/blog/">Josh Holmes</a> opened the conference proper with his Simplicity keynote. I've had the privilege of seeing this at PHPUK earlier this year, however, a second listen was appreciated. Josh showed us his theatre background when the mic failed by continuing to talk and projecting his voice all the way to the back of the room. I gave <a href="http://joind.in/talk/view/1591">my talk on Zend_Form</a> next, which also seemed to help people learn a little more about the component. As there's probably more confusion over decorators than anything else, I concentrated on them, which may have made them clearer for those who saw it.</p>
<p>I don't want to provide a run down of all the talks as exploring the <a href="http://joind.in/event/view/137">joind.in</a> page will tell you more than I could here. I do want to highlight a few though. <a href="http://www.lornajane.net/">Lorna</a>'s talk on <a href="http://joind.in/talk/view/1598">Subversion and DVCSs</a> was the most objective and balanced discussion on an emotive topic. I had seen an earlier version at my local user group and Lorna really pulled out all the stops at Tek to give the best session I've seen her give. Having missed her tutorial, I made sure that I went to <a href="http://joind.in/talk/view/1600">Kristina's talk on MongoDB</a>. I've heard some rumblings in the Twitter stream about Mongo, but didn't actually know anything about it before her talk. It is always a pleasure to listen to an expert who is passionate about her subject. Talking about passionate, <a href="http://elizabethmariesmith.com/">Elizabeth</a>'s talk on <a href="http://joind.in/talk/view/1595">cross-platform PHP</a> was a study in how you don't need many slides if (a) you are angry and (b) slightly hungover and so are prepared to rant! I thought I knew all the pitfalls of developing PHP sites for both nix and Windows, but Liz managed to point out a few more to think about.</p>
<p><a href="http://www.flickr.com/photos/86569608@N00/4642334469"><img border="0"width="500"alt="Liz gets angry during her talk!"src="http://farm5.static.flickr.com/4015/4642334469_c45a489858.jpg"height="333"/></a></p>
<p>Tek is a very community oriented conference and it did feel that there was an open atmosphere where talking to each other was encouraged. This is known as the "hallway track" and I found it very beneficial, managing to get some useful conversations with people who know far more than I do. This definitely increased my knowledge and hopefully those who talked to me also gained. I also managed to get some time with Chris "phpdeveloper" Cornutt who helped me get the joind.in source code working on my computer so that I can help the project by fixing the bits that annoy me the most :)</p>
<p><a href="http://www.flickr.com/photos/86569608@N00/4639329757" title="View 'Potbelly sandwiches' on Flickr.com"><img border="0"width="500"alt="Potbelly sandwiches"src="http://farm5.static.flickr.com/4037/4639329757_9d86c03cd2.jpg"height="335"/></a></p>
<p>Finally, I'd like to thank <a href="http://blog.tabini.ca/">Marco</a>, <a href="http://blog.calevans.com/">Cal</a>, <a href="http://caseysoftware.com/blog">Keith</a>, <a href="http://twitter.com/arzoum">Arbi</a> and <a href="http://twitter.com/e3betht">Beth</a> for hosting an excellent conference and inviting me to speak at it. Hopefully, I'll be able to go next year too!</p>
]]></content:encoded>
			<wfw:commentRss>http://akrabat.com/conferences/tek-x-recap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
