<?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>Cakephp.nu blog</title>
	
	<link>http://www.cakephp.nu</link>
	<description>Cake and cookies by Jippi</description>
	<lastBuildDate>Wed, 11 Aug 2010 09:15:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/cakephp/all" /><feedburner:info uri="cakephp/all" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Varnish test :D~</title>
		<link>http://www.cakephp.nu/varnish-test</link>
		<comments>http://www.cakephp.nu/varnish-test#comments</comments>
		<pubDate>Wed, 11 Aug 2010 09:01:20 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu:81/?p=42</guid>
		<description><![CDATA[
Varnish test very nice stuff?! No tag for this post.
]]></description>
			<content:encoded><![CDATA[<p>Varnish test <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>very nice stuff?!</p>
No tag for this post.]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/varnish-test/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generic non-www to www (and vice versa) 301 redirect using .htaccess</title>
		<link>http://www.cakephp.nu/quick-tip-generic-nonwww-www-vice-versa-301-redirect-htaccess</link>
		<comments>http://www.cakephp.nu/quick-tip-generic-nonwww-www-vice-versa-301-redirect-htaccess#comments</comments>
		<pubDate>Mon, 03 Nov 2008 15:33:06 +0000</pubDate>
		<dc:creator>Biesbjerg</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[generic]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/?p=23</guid>
		<description><![CDATA[
The problem: I&#8217;ve always hardcoded the domain name in my htaccess&#8217;es, requiring me to make changes each time I deploy a new website. The solution: Behold, an alternate, generic method of redirecting non-www to www and www to non-www, requiring no changes between deployments! Non-www to www RewriteCond %{HTTP_HOST} !^www\. RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L] www [...]
]]></description>
			<content:encoded><![CDATA[<h2>The problem:</h2>
<p>I&#8217;ve always hardcoded the domain name in my htaccess&#8217;es, requiring me to make changes each time I deploy a new website.</p>
<h2>The solution:</h2>
<p>Behold, an alternate, generic method of redirecting non-www to www and www to non-www, requiring no changes between deployments!</p>
<h3>Non-www to www</h3>
<pre>RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]</pre>
<h3>www to non-www</h3>
<pre>RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]</pre>
<h3>Bonus tip: Remove trailing slash from address line</h3>
<p>RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]</p>

	Tags: <a href="http://www.cakephp.nu/t/301" title="301" rel="tag">301</a>, <a href="http://www.cakephp.nu/t/generic" title="generic" rel="tag">generic</a>, <a href="http://www.cakephp.nu/t/htaccess" title="htaccess" rel="tag">htaccess</a>, <a href="http://www.cakephp.nu/t/redirect" title="redirect" rel="tag">redirect</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/quick-tip-generic-nonwww-www-vice-versa-301-redirect-htaccess/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Yay – my dell new server is now online :D</title>
		<link>http://www.cakephp.nu/my-new-dell-server-is-now-online</link>
		<comments>http://www.cakephp.nu/my-new-dell-server-is-now-online#comments</comments>
		<pubDate>Wed, 16 Jul 2008 22:15:37 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/?p=22</guid>
		<description><![CDATA[
Finally I got the good news from my new hosting company I can hardly wait to get it FreeBSD 7.0 installed on it and setup a nice vhost system with Lighttpd + PostgreSQL. It&#8217;s gonna be awsome. The server I&#8217;m currently using is &#8216;only&#8217; Dual core XEON w/ 3.5Gb ram, and some random SATA drives, [...]
]]></description>
			<content:encoded><![CDATA[<p>Finally I got the good news from my <a href="http://www.logiqit.com">new hosting company</a></p>
<p>I can hardly wait to get it FreeBSD 7.0 installed on it and setup a nice vhost system with Lighttpd + PostgreSQL. It&#8217;s gonna be awsome.<br />
The server I&#8217;m currently using is &#8216;only&#8217; Dual core XEON w/ 3.5Gb ram, and some random SATA drives, so the improvement should be huge <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>I&#8217;m quite excited, because its going to be my first server ever without Apache and MySQL installed. Or well, atleast until some stupid customer or what not (<a href="http://www.kosmosgrafisk.dk">Biesbjerg</a>?) demands it <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If I can find the time, I will write a guide on how I&#8217;m going to configure my server (Lighttpd, PostgreSQL, Dovecot + sendmail, quota, fast-cgi php5), it might be useful for someone <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Let me know if it has any interest to you guys <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Specs</h2>
<p>- Dell PE 1950 III<br />
- PE1950 PCIE Riser (2 Slots) 1 S<br />
- <strong>Quad Core Xeon E5410 (2.33GHz, 2x6MB, 1333MHz FSB)</strong> (SMP supported)<br />
- <strong>4GB (2x2GB Dual Rank DIMMs) 667MHz FBD (up to 32 GB)</strong><br />
- <strong>3x 146GB SAS 10k 2.5&#8243; HDPE1950 III 2.5&#8243;</strong> HDD support chassis<br />
- Perc 6i Integrated Controller<br />
- 8X DVD-ROM Drive IDE<br />
- PE1950 III Non-Redundant Power Supply No Power Cord<br />
- TCP/IP Offload Engine 2P<br />
- Broadcom TCP/IP Offload Engine functionality (TOE) Not Enabled<br />
- PE1950 OpenManage kit and FI Driver<br />
- CFI EMEA Service. (SV-Hi) OR PowerEdge, RAID/partition<br />
- RAID 1 Single Container<br />
- RAID 0 (1 HDD)<br />
- Rack Rails Static Rapid 1 S<br />
- PE1950 III &#8211; C2,MSSR0,ADD IN PERC5i/6i/SAS6iR, min 2 / max 2 or 4</p>
<p>/Jippi</p>

	Tags: <a href="http://www.cakephp.nu/t/dell" title="dell" rel="tag">dell</a>, <a href="http://www.cakephp.nu/t/dovecot" title="dovecot" rel="tag">dovecot</a>, <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/lighttpd" title="lighttpd" rel="tag">lighttpd</a>, <a href="http://www.cakephp.nu/t/news" title="news" rel="tag">news</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/my-new-dell-server-is-now-online/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>open_basedir will slow you down – security vs. speed</title>
		<link>http://www.cakephp.nu/open_basedir-will-slow-you-down-security-vs-speed</link>
		<comments>http://www.cakephp.nu/open_basedir-will-slow-you-down-security-vs-speed#comments</comments>
		<pubDate>Fri, 21 Mar 2008 01:48:58 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/open_basedir-will-slow-you-down-security-vs-speed</guid>
		<description><![CDATA[
Just a quickie. I’m working on some security enhancements for my new website project, and in that progress, I have moved away from Apache2.2.3 and now using Lighttpd instead. Lighttpd does not use the same method of invoking php as apache does (mod_php vs. fast-cgi php). In my eager to make the application as secure [...]
]]></description>
			<content:encoded><![CDATA[<p>Just a quickie.</p>
<p>I’m working on some security enhancements for my new website project, and in that progress, I have moved away from Apache2.2.3 and now using Lighttpd instead. Lighttpd does not use the same method of invoking php as apache does (mod_php vs. fast-cgi php).</p>
<p>In my eager to make the application as secure and locked down as possible, I went berserk in the php-cgi.ini file and turned on just about any security feature I could find (not safemode!), including the innocent looking switch called “open_basedir”.</p>
<p>That was rather late in the night, so when I resumed my work the following day, I have long forgotten about all the fancy security settings I had enabled in php. </p>
<p>A few hours ago I noticed that the complete render time for the front page suddenly was ~2seconds(!) &#8211; and comparing with apache’s load time for the same page (0.9s) I was quite disappointed at lighttpd and fastcgi, but refused to give up my new found love without a fair trial.</p>
<p>I attacked google with full force without finding any useful resources that might be able to explain my issue.. I was quite sure it was APC that did not function well in a fastcgi environment &#8211; and therefore my google madness was focused around the keywords “apc + fastcgi”  </p>
<p>While chatting to PatrickDK in the #lighttpd channel @ freenode, it suddenly hit me &#8211; let’s try to disable everything I have “fixed” last night &#8211; starting with XDebug, some 3rd party php modules (syck, memcache, simplexml, fileinfo) &#8211; and then, open_basedir flag.</p>
<p><b>And with just one line commented out in my php-cgi.ini file, the render time went from 2.4 to 0.5 seconds !!(!!) </b></p>
<p>So just a little note to you guys out there, beware of the open_basedir setting in a setup where you include many files, it is a rather costly feature to use. And when running fastcgi php in chroot()ed setup, its not really required anyway  </p>
<p><b>Its another +1 for lighty and fastcgi</b></p>
<p>And yes, I’m aware that open_basedir is slow because it has to validate EVERY file or path you work with inside php to check if its within the scope defined.</p>

	Tags: <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/lighttpd" title="lighttpd" rel="tag">lighttpd</a>, <a href="http://www.cakephp.nu/t/php" title="php" rel="tag">php</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/open_basedir-will-slow-you-down-security-vs-speed/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>New books from amazon.co.uk</title>
		<link>http://www.cakephp.nu/books-amazoncouk</link>
		<comments>http://www.cakephp.nu/books-amazoncouk#comments</comments>
		<pubDate>Wed, 19 Mar 2008 21:20:19 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/books-amazoncouk</guid>
		<description><![CDATA[
Just got an email from Amazon.co.uk &#8211; the have shipped my new batch of dev-books This time around it was more an impulze to buy some books, so I hope I will end up as satisfied as last time I purchased some books from them. Building Scalable Web Sites: Building, scaling, and optimizing the next [...]
]]></description>
			<content:encoded><![CDATA[<p>Just got an email from Amazon.co.uk &#8211; the have shipped my new batch of dev-books <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This time around it was more an impulze to buy some books, so I hope I will end up as satisfied as last time I purchased some books from them.</p>
<ul>
<li><a target="_blank" href="http://www.amazon.co.uk/exec/obidos/ASIN/0596102356">Building Scalable Web Sites: Building, scaling, and optimizing the next generation of web applications</a></li>
<li><a target="_blank" href="http://www.amazon.co.uk/exec/obidos/ASIN/0596529260">RESTful Web Services</a></li>
<li><a target="_blank" href="http://www.amazon.co.uk/exec/obidos/ASIN/0596529309">High Performance Web Sites: Essential Knowledge for Front-End Engineers: Essential Knowledge for Front-end Engineers</a></li>
<li><a target="_blank" href="http://www.amazon.co.uk/exec/obidos/ASIN/0672327562">PostgreSQL (Developers Library)</a></li>
<li><a target="_blank" href="http://www.amazon.co.uk/exec/obidos/ASIN/097584198X">The CSS Anthology: 101 Essential Tips, Tricks and Hacks</a></li>
</ul>
<p>I will probably give a short review of the books once I have read them <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

	Tags: <a href="http://www.cakephp.nu/t/amazon" title="amazon" rel="tag">amazon</a>, <a href="http://www.cakephp.nu/t/books" title="books" rel="tag">books</a>, <a href="http://www.cakephp.nu/t/css" title="css" rel="tag">css</a>, <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/php" title="php" rel="tag">php</a>, <a href="http://www.cakephp.nu/t/postgresql" title="postgresql" rel="tag">postgresql</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/books-amazoncouk/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faster Page Loads – Bundle Your CSS and Javascript with lighttpd</title>
		<link>http://www.cakephp.nu/faster-page-loads-bundle-your-css-and-javascript-lighttpd-mod_magnet-lua</link>
		<comments>http://www.cakephp.nu/faster-page-loads-bundle-your-css-and-javascript-lighttpd-mod_magnet-lua#comments</comments>
		<pubDate>Tue, 18 Mar 2008 15:23:40 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[mod_magnet]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/lighttpd-mod_magnet-written-lua-concat-script</guid>
		<description><![CDATA[
Hello again, Preface This time I have been busy playing with Lighttpd and mod_magnet. I found a blog post where darix mentions a post from sitepoint where they demostrate a technique to speed up the HTTP GET of javascript and CSS files. Its quite simple really, instead of doing &#38;lt;link href=&#34;/css/styles1.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34; /&#38;gt; &#38;lt;link [...]
]]></description>
			<content:encoded><![CDATA[<p>Hello again,</p>
<h3>Preface</h3>
<p>This time I have been busy playing with <a target="_blank" href="http://www.lighttpd.net/">Lighttpd</a> and <a target="_blank" href="http://trac.lighttpd.net/trac/wiki/Docs:ModMagnet">mod_magnet</a>. I found <a target="_blank" href="http://nordisch.org/2007/4/10/hah-it-s-not-only-me">a blog post </a>where <a target="_blank" href="http://nordisch.org/">darix </a> mentions a post from sitepoint where they demostrate <a target="_blank" href="http://www.sitepoint.com/blogs/2007/04/10/faster-page-loads-bundle-your-css-and-javascript/">a technique to speed up the HTTP GET of javascript and CSS files</a>. </p>
<p>Its quite simple really, instead of doing</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&amp;lt;link href=&quot;/css/styles1.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&amp;gt;
&amp;lt;link href=&quot;/css/styles2.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&amp;gt;
&amp;lt;link href=&quot;/css/styles3.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&amp;gt;</pre></div></div>

<p>you simply do</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&amp;lt;link href=&quot;/css/styles1.css,styles2.css,styles3.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&amp;gt;</pre></div></div>

<p>and then this script will automagic concat them together into one big file, and make lighty serve that one instead. (The same goes for javascript files, or anything really)</p>
<p>This could save ALOT of HTTP GET&#8217;s to your server, and increase the overall loadtime and performance of your site alot, especially if you use alot of Web2.0 stuff <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>However, the Lua source for their script was not made public, so nobody could benifit from their otherwise impressive speed gains. <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Until now.. or, well, almost &#8211; its not their script, but my own attempt to mimic what they did in pure <a target="_blank" href="http://www.lua.org/">Lua</a> <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I tried to keep the dependencies down to a minimum, however I decided to use one, md5.<br />
You can find the source <a target="_blank" href="http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lmd5">here</a> (<a href="http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1/lmd5.tar.gz">5.1</a>, <a href="http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.0/lmd5.tar.gz">5.0</a>)</p>
<h3>Config</h3>
<dl>
<dt>charset (Line 42)</dt>
<dd>Set it so it matches the headers in your lighttpd.conf file. Must match your mod_compress settings aswell to utilize that feature</dd>
<dt>prefix (Line 43)</dt>
<dd>Could be anything really, its just a mean to &#8220;namespace&#8221; your cached files so you can run the script with multiple configs</dd>
<dt>rootPath (Line 44)</dt>
<dd>The path to look for the files to concat, default should be fine for most  DOC_ROOT/js  and DOC_ROOT/css</dd>
<dt>concatRoot (Line 45)</dt>
<dd>The folder to store the concated files, can be anywhere <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </dd>
</dl>
<h3>Setup</h3>
<ul>
<li>Put the source below somewhere on your disk, I asume you name it bundle.lua</li>
<li>Enable mod_magnet in lighttpd.conf</li>
<li>Add <u>magnet.attract-physical-path-to = ( &#8220;YOUR_PATH/bundle.lua&#8221; )</u> to your config where needed</li>
<li>Restart lighttpd</li>
<li>Modify your css/js links to utilize the new feature:)</li>
</ul>
<p>Optimal you can enable mod_compress aswell, bundle.lua works out of the box with any other lighttpd module you may have <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Source</h3>
<p><a target="_blank" href="http://www.cakephp.nu/files/mod_magnet/bundle_0.1.lua">download source</a></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
</pre></td><td class="code"><pre class="lua" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">--- get stat information on a path</span>
<span style="color: #808080; font-style: italic;">-- @param path to stat</span>
<span style="color: #808080; font-style: italic;">-- @param the ftype to return</span>
<span style="color: #808080; font-style: italic;">-- @return false if ftype or path does not exist</span>
<span style="color: #b1b100;">function</span> file_info<span style="color: #66cc66;">&#40;</span>path, ftype<span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">local</span> attr <span style="color: #66cc66;">=</span> lighty.stat<span style="color: #66cc66;">&#40;</span>path<span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">if</span> attr <span style="color: #b1b100;">and</span> attr<span style="color: #66cc66;">&#91;</span>ftype<span style="color: #66cc66;">&#93;</span> <span style="color: #b1b100;">then</span>
        <span style="color: #b1b100;">return</span> attr<span style="color: #66cc66;">&#91;</span>ftype<span style="color: #66cc66;">&#93;</span>
    <span style="color: #b1b100;">end</span>
    <span style="color: #b1b100;">return</span> <span style="color: #b1b100;">false</span>
<span style="color: #b1b100;">end</span>
&nbsp;
<span style="color: #808080; font-style: italic;">--- Wrapper for reading a full file into a string</span>
<span style="color: #808080; font-style: italic;">-- @param filename Full path to the file</span>
<span style="color: #808080; font-style: italic;">-- @return a string with the content of the file</span>
<span style="color: #b1b100;">function</span> read_file<span style="color: #66cc66;">&#40;</span>filename<span style="color: #66cc66;">&#41;</span> 
    <span style="color: #b1b100;">local</span> content <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;&quot;</span>
    <span style="color: #b1b100;">if</span> file_info<span style="color: #66cc66;">&#40;</span>filename, <span style="color: #ff0000;">&quot;is_file&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">then</span>
        <span style="color: #b1b100;">local</span> file <span style="color: #66cc66;">=</span> <span style="color: #b1b100;">io.open</span><span style="color: #66cc66;">&#40;</span>filename, <span style="color: #ff0000;">&quot;r&quot;</span><span style="color: #66cc66;">&#41;</span>
        content <span style="color: #66cc66;">=</span> file:<span style="color: #b1b100;">read</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;*a&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #b1b100;">io.close</span><span style="color: #66cc66;">&#40;</span>file<span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">end</span>
    <span style="color: #b1b100;">return</span> content
<span style="color: #b1b100;">end</span>
&nbsp;
<span style="color: #808080; font-style: italic;">--- Wrapper for writeing content to a file</span>
<span style="color: #808080; font-style: italic;">-- @param filename Full path to the destionation file</span>
<span style="color: #808080; font-style: italic;">-- @param content The string to write</span>
<span style="color: #b1b100;">function</span> write_cache<span style="color: #66cc66;">&#40;</span>filename, content<span style="color: #66cc66;">&#41;</span> 
    <span style="color: #b1b100;">local</span> file <span style="color: #66cc66;">=</span> <span style="color: #b1b100;">io.open</span><span style="color: #66cc66;">&#40;</span>filename, <span style="color: #ff0000;">&quot;w&quot;</span><span style="color: #66cc66;">&#41;</span>
    file:<span style="color: #b1b100;">write</span><span style="color: #66cc66;">&#40;</span>content<span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">io.close</span><span style="color: #66cc66;">&#40;</span>file<span style="color: #66cc66;">&#41;</span>
<span style="color: #b1b100;">end</span>
&nbsp;
<span style="color: #808080; font-style: italic;">--- Concat multiple files into one file </span>
<span style="color: #808080; font-style: italic;">-- @param lighty lighty global variable passed to the method</span>
<span style="color: #808080; font-style: italic;">-- @param match The files that will be concat into a file</span>
<span style="color: #808080; font-style: italic;">-- @param fileExtension Do !NOT! include the dot ( . )</span>
<span style="color: #b1b100;">function</span> combine_files<span style="color: #66cc66;">&#40;</span>lighty, files, fileExtension<span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">require</span> <span style="color: #ff0000;">&quot;md5&quot;</span> 
&nbsp;
    <span style="color: #b1b100;">local</span> charset       <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;; charset=utf-8&quot;</span>
    <span style="color: #b1b100;">local</span> prefix        <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;cache-&quot;</span>
    <span style="color: #b1b100;">local</span> rootPath      <span style="color: #66cc66;">=</span> lighty.env<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;physical.doc-root&quot;</span><span style="color: #66cc66;">&#93;</span> .. fileExtension .. <span style="color: #ff0000;">&quot;/&quot;</span>
    <span style="color: #b1b100;">local</span> concatRoot     <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;/tmp/cache/&quot;</span>
    <span style="color: #b1b100;">local</span> lastModified  <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span>
&nbsp;
    <span style="color: #b1b100;">for</span> file <span style="color: #b1b100;">in</span> <span style="color: #b1b100;">string</span>.gmatch<span style="color: #66cc66;">&#40;</span>files, <span style="color: #ff0000;">&quot;(.-<span style="color: #000099; font-weight: bold;">\.</span>&quot;</span> .. fileExtension .. <span style="color: #ff0000;">&quot;),?&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">do</span>
        <span style="color: #b1b100;">local</span> fullPath <span style="color: #66cc66;">=</span> rootPath .. file
        modTime <span style="color: #66cc66;">=</span> file_info<span style="color: #66cc66;">&#40;</span>fullPath, <span style="color: #ff0000;">&quot;st_mtime&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #b1b100;">type</span><span style="color: #66cc66;">&#40;</span>modTime<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;number&quot;</span> <span style="color: #b1b100;">then</span>
            lastModified <span style="color: #66cc66;">=</span> <span style="color: #b1b100;">math.max</span><span style="color: #66cc66;">&#40;</span>lastModified, modTime<span style="color: #66cc66;">&#41;</span>
        <span style="color: #b1b100;">end</span>            
     <span style="color: #b1b100;">end</span>
&nbsp;
     <span style="color: #b1b100;">local</span> hash <span style="color: #66cc66;">=</span> lastModified .. <span style="color: #ff0000;">&quot;-&quot;</span> .. md5.sumhexa<span style="color: #66cc66;">&#40;</span>files<span style="color: #66cc66;">&#41;</span>
     lighty.header<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;Etag&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'&quot;'</span> .. hash ..<span style="color: #ff0000;">'&quot;'</span>
&nbsp;
    <span style="color: #b1b100;">local</span> cacheFile <span style="color: #66cc66;">=</span> prefix .. hash .. <span style="color: #ff0000;">'.'</span> .. fileExtension
    <span style="color: #b1b100;">if</span> <span style="color: #b1b100;">not</span> file_info<span style="color: #66cc66;">&#40;</span>concatRoot .. cacheFile, <span style="color: #ff0000;">&quot;is_file&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">then</span>
        <span style="color: #b1b100;">local</span> content <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;&quot;</span>
        <span style="color: #b1b100;">for</span> file <span style="color: #b1b100;">in</span> <span style="color: #b1b100;">string</span>.gmatch<span style="color: #66cc66;">&#40;</span>match, <span style="color: #ff0000;">&quot;(.-<span style="color: #000099; font-weight: bold;">\.</span>&quot;</span> .. fileExtension .. <span style="color: #ff0000;">&quot;),?&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">do</span>
            content <span style="color: #66cc66;">=</span> content .. <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
            content <span style="color: #66cc66;">=</span> content .. <span style="color: #ff0000;">&quot;/**<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
            content <span style="color: #66cc66;">=</span> content .. <span style="color: #ff0000;">&quot; *<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
            content <span style="color: #66cc66;">=</span> content .. <span style="color: #ff0000;">&quot; *  &quot;</span> .. file .. <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
            content <span style="color: #66cc66;">=</span> content .. <span style="color: #ff0000;">&quot; *<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
            content <span style="color: #66cc66;">=</span> content .. <span style="color: #ff0000;">&quot; */<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
            content <span style="color: #66cc66;">=</span> content .. <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
            content <span style="color: #66cc66;">=</span> content .. read_file<span style="color: #66cc66;">&#40;</span>rootPath .. file<span style="color: #66cc66;">&#41;</span>
        <span style="color: #b1b100;">end</span>
        write_cache<span style="color: #66cc66;">&#40;</span>concatRoot .. cacheFile, content <span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">end</span>
    lighty.env<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;physical.path&quot;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">=</span> concatRoot .. cacheFile
<span style="color: #b1b100;">end</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> file_info<span style="color: #66cc66;">&#40;</span>lighty.env<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;physical.path&quot;</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">&quot;is_file&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">then</span>
    css <span style="color: #66cc66;">=</span> <span style="color: #b1b100;">string</span>.match<span style="color: #66cc66;">&#40;</span>lighty.env<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;physical.path&quot;</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">&quot;css/(.*<span style="color: #000099; font-weight: bold;">\.</span>css)&quot;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #b1b100;">if</span> css <span style="color: #b1b100;">then</span>
        <span style="color: #b1b100;">return</span> combine_files<span style="color: #66cc66;">&#40;</span>lighty, css, <span style="color: #ff0000;">&quot;css&quot;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">end</span>
&nbsp;
    js <span style="color: #66cc66;">=</span> <span style="color: #b1b100;">string</span>.match<span style="color: #66cc66;">&#40;</span>lighty.env<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;physical.path&quot;</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">&quot;js/(.*<span style="color: #000099; font-weight: bold;">\.</span>js)&quot;</span><span style="color: #66cc66;">&#41;</span>	    
	<span style="color: #b1b100;">if</span> js <span style="color: #b1b100;">then</span>
        <span style="color: #b1b100;">return</span> combine_files<span style="color: #66cc66;">&#40;</span>lighty, js, <span style="color: #ff0000;">&quot;js&quot;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #b1b100;">end</span> 
<span style="color: #b1b100;">end</span></pre></td></tr></table></div>


	Tags: <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/lighttpd" title="lighttpd" rel="tag">lighttpd</a>, <a href="http://www.cakephp.nu/t/lua" title="lua" rel="tag">lua</a>, <a href="http://www.cakephp.nu/t/mod_magnet" title="mod_magnet" rel="tag">mod_magnet</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/faster-page-loads-bundle-your-css-and-javascript-lighttpd-mod_magnet-lua/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>A quick tutorial on CakePHP Set class (Part 1)</title>
		<link>http://www.cakephp.nu/quick-tutorial-cakephp-set-class-part-1</link>
		<comments>http://www.cakephp.nu/quick-tutorial-cakephp-set-class-part-1#comments</comments>
		<pubDate>Mon, 03 Mar 2008 23:56:36 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[set]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/quick-turtorial-cakephp-set-class-part-1</guid>
		<description><![CDATA[
Test data 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 $data = [...]
]]></description>
			<content:encoded><![CDATA[<h3>Test data</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
    <span style="color: #cc66cc;">1</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Post'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
            <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_comment_count'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> 
            <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My first title'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My first body'</span> 
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
        <span style="color: #0000ff;">'PostComment'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
            <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
                <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'is_active'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> 
                <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My first comment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My first comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
            <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
                <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'is_active'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> 
                <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My second comment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My second comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
            <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
                <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'is_active'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> 
                <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My third comment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My third comment'</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
    <span style="color: #cc66cc;">2</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Post'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
            <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_comment_count'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> 
            <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My second title'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My second title'</span> 
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
        <span style="color: #0000ff;">'PostComment'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
            <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
                <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'is_active'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> 
                <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My fourth comment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My fourth comment'</span> 
            <span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
    <span style="color: #cc66cc;">3</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Post'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
            <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_comment_count'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> 
            <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My third title'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My third title'</span> 
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
        <span style="color: #0000ff;">'PostComment'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>                   
&nbsp;
        <span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>                   
&nbsp;
<span style="color: #000088;">$dataExtra</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
    <span style="color: #cc66cc;">4</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Post'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
            <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_comment_count'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> 
            <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My fourth title'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My fourth title'</span> 
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
        <span style="color: #0000ff;">'PostComment'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
            <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
                <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'is_active'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> 
                <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My fifth comment'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'bdoy'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My fifth comment'</span> 
            <span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#41;</span> 
    <span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Set::merge</h3>
<p><strong>PHP doc blcok</strong></p>
<pre>
This function can be thought of as a hybrid between PHP's array_merge and
array_merge_recursive. The difference to the two is that if an array key
contains another array then the function behaves recursive (unlike array_merge)
but does not do if for keys containing strings (unlike array_merge_recursive).
See the unit test for more information.         

Note: This function will work with an unlimited amount of arguments and
typecasts non-array parameters into arrays.</pre>
<p>A bit like <a target="_blank" href="http://php.net/array_merge_recursive">array_merge_recursive</a>. Merge joins two arrays on their keys.<br />
If we want to add the <strong>$extraData</strong> array into the <strong>$dat</strong> most people would probably think, hey, lets merge them using Set::merge&#8230; but.. no, dont, unless you know what your doing.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">pr<span style="color: #009900;">&#40;</span>Set<span style="color: #339933;">::</span><span style="color: #004000;">merge</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dataExtra</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The above cod will only produce the &#8216;expected&#8217;(?) result because I have added the numeric key <strong>4</strong> in the $extraData array (Line 40). If I had, as I did the first time around, just let php auto-increment the keys for me, both $datad and $extraData would contain the numeric index key <strong>0</strong>, and since Set::merge works on keys, $extraData&#8217;s <strong>Fourth post</strong> would overwrite $data&#8217;s <strong>First post</strong> where they had anything in common (id, name, post_comment_count, body <strong>and</strong> everything in the first PostComment (My first comment)).</p>
<p>In case I had let php handle the index keys, I would have to use Set::insert to append the fourth comment to the list.</p>
<p>A better use of Set::merge is in CAKE/libs/model/model.php where is automagic merges &#8216;actsAs&#8217; from your current model (PostComment) and your AppModel, so you automagic inherit the global behaviors from AppModel:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// model.php </span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_subclass_of</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'AppModel'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #000088;">$appVars</span> <span style="color: #339933;">=</span> <span style="color: #990000;">get_class_vars</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'AppModel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$merge</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>             
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>actsAs <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">null</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>actsAs <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
        <span style="color: #000088;">$merge</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'actsAs'</span><span style="color: #339933;">;</span> 
    <span style="color: #009900;">&#125;</span>             
&nbsp;
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$merge</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$var</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: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$appVars</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$appVars</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> Set<span style="color: #339933;">::</span><span style="color: #004000;">merge</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$appVars</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
        <span style="color: #009900;">&#125;</span> 
    <span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>A funny thing is that Set::merge is still rarely used in the core code yet. Probably because array_merge (or <strong>am()</strong>) is faster for simple operations like just merging two simple 1 level arrays like a config array.</p>
<h3>Set::filter</h3>
<p><strong>PHP doc blcok</strong></p>
<pre>Filters empty elements out of a route array, excluding '0'.</pre>
<p>This method is <strong>not</strong> recursive. So doing</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> ?php 
pr<span style="color: #009900;">&#40;</span>Set<span style="color: #339933;">::</span><span style="color: #004000;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>wont change anything in the array sinc no elements in first level is empty.</p>
<pre></pre>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">pr<span style="color: #009900;">&#40;</span>Set<span style="color: #339933;">::</span><span style="color: #004000;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>      
&nbsp;
<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Post'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
    <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'post_comment_count'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My third title'</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'body'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'My third title'</span> 
    <span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>We will notice that the PostComment array is gone, since its empty</p>
<h3>Set::pushDiff</h3>
<p><strong>PHP doc blcok</strong></p>
<pre>
Pushes the differences in $array2 onto the end of $array</pre>
<p>That sounds simple enough, and it really is.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">pr<span style="color: #009900;">&#40;</span>Set<span style="color: #339933;">::</span><span style="color: #004000;">pushDiff</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dataExtra</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>just pushes the $dataExtra on the end of $data, since they have nothing in common. Again, this method operates on the array keys when comparing arrays.</p>
<h3>Set::map</h3>
<p><strong>PHP doc block</strong></p>
<pre>
Maps the contents of the Set object to an object hierarchy.
Maintains numeric keys as arrays of objects</pre>
<p>That sounds very fancy, and it is! A lot of people migrating to CakePHP from Symfony (PHPDoctrine, Propel) will probably be confused at first that all model data in CakePHP is arrays, and not objects like other frameworks. This method attemps to &#8216;fix&#8217; this issue by converting a model data array to a set of objects (StdClass). StdClass is a build-in dummy class in PHP, and it doesnt really do anything but contain data, no methods or fancy magic there.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> ?php 
<span style="color: #666666; font-style: italic;">// Convert to objects </span>
<span style="color: #000088;">$map</span> <span style="color: #339933;">=</span> Set<span style="color: #339933;">::</span><span style="color: #004000;">map</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// id of first post (Object style) </span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$map</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>id<span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// name of first comment to first post (Object style) </span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$map</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>PostComment<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>name<span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// name of first comment to first post (array style) </span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$map</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PostComment'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// WONT WORK, Cannot access StdClass as an array</span></pre></td></tr></table></div>

<p>As you can see above, its important to decide what method you want to use, Object or Array style, since they cannot be mixed.<br />
Also, the return from Set::map is a mix of arrays and StdClass, thats why I can access $map[0] as array, but not access $map[0]['name'].</p>
<h3>Set::numeric</h3>
<p><strong>PHP doc blcok</strong></p>
<pre>
Checks to see if all the values in the array are numeric</pre>
<p>Not much to say on this one, because it doesnt do more or less than the name implies.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// false </span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span>Set<span style="color: #339933;">::</span><span style="color: #004000;">numeric</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// false </span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span>Set<span style="color: #339933;">::</span><span style="color: #004000;">numeric</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// false </span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span>Set<span style="color: #339933;">::</span><span style="color: #004000;">numeric</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PostComment'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// true </span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span>Set<span style="color: #339933;">::</span><span style="color: #004000;">numeric</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>&#8212;&#8212;-</p>
<p>Thats it for now, next time I will look at:</p>
<p>Set::enum, Set::format, Set::extract, Set::insert, Set::remove, Set::check, Set::diff, Set::isEqual, Set::contains, Set::countDim, Set::normalize, Set::combine and Set::reverse.</p>
<p>Look forward to it</p>

	Tags: <a href="http://www.cakephp.nu/t/cakephp" title="Cakephp" rel="tag">Cakephp</a>, <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/set" title="set" rel="tag">set</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/quick-tutorial-cakephp-set-class-part-1/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A small change in RSS feeds.</title>
		<link>http://www.cakephp.nu/small-change-rss-feeds</link>
		<comments>http://www.cakephp.nu/small-change-rss-feeds#comments</comments>
		<pubDate>Mon, 03 Mar 2008 22:52:56 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[danish]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/small-change-rss-feeds</guid>
		<description><![CDATA[
Hello again. I have made a small change to the feeds now. Everybody who has subscribed by Feedburner should not notice anything strange. The reason for the change is that I want to be able to blog in Danish too once in a while, and to avoid the &#8216;danish pølsesnak&#8217; for you guys who does [...]
]]></description>
			<content:encoded><![CDATA[<p>Hello again.</p>
<p>I have made a small change to the feeds now. Everybody who has subscribed by Feedburner should not notice anything strange.</p>
<p>The reason for the change is that I want to be able to blog in Danish too once in a while, and to avoid the &#8216;danish pølsesnak&#8217; for you guys who does not understand Danish, I have moved the feed location to include only posts with the &#8216;english&#8217; tag in the future <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://feeds.feedburner.com/CakephpnuBlog">English posts only</a> (Hopefully your using this one right now <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), <a href="http://feeds.feedburner.com/CakephpnuBlogDanish">Danish posts only</a> and <a href="http://feeds.feedburner.com/cakephp/all">Danish+English posts</a></p>
<p>/Jippi</p>

	Tags: <a href="http://www.cakephp.nu/t/danish" title="danish" rel="tag">danish</a>, <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/news" title="news" rel="tag">news</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/small-change-rss-feeds/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Første danske post</title>
		<link>http://www.cakephp.nu/frste-danske-post</link>
		<comments>http://www.cakephp.nu/frste-danske-post#comments</comments>
		<pubDate>Mon, 03 Mar 2008 22:49:02 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[danish]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/frste-danske-post</guid>
		<description><![CDATA[
Dettte er min første danske post Tags: danish
]]></description>
			<content:encoded><![CDATA[<p>Dettte er min første danske post</p>

	Tags: <a href="http://www.cakephp.nu/t/danish" title="danish" rel="tag">danish</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/frste-danske-post/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CakePHP talk from FOSDEM – Free and Open Source Software Developers’ European Meeting</title>
		<link>http://www.cakephp.nu/cakephp-talk-fosdem-free-open-source-software-developers-european-meeting</link>
		<comments>http://www.cakephp.nu/cakephp-talk-fosdem-free-open-source-software-developers-european-meeting#comments</comments>
		<pubDate>Mon, 03 Mar 2008 21:43:13 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[fosdem]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/cakephp-talk-fosdem-free-open-source-software-developers-european-meeting</guid>
		<description><![CDATA[
A small note, gwoo&#8217;s talk from FOSDM 2008 has been made public avilable here together with his slides. Its actually a quite good presentation, too bad he ran out of time in the end Tags: Cakephp, english, fosdem
]]></description>
			<content:encoded><![CDATA[<p>A small note, gwoo&#8217;s talk from <a href="http://www.fosdem.org/">FOSDM 2008</a> has been made <a href="http://ftp.heanet.ie/mirrors/fosdem-video/2008/maintracks/FOSDEM2008-cakephp.ogg">public avilable here</a> together with <a href="http://cakephp.org/files/FOSDEM.pdf">his slides</a>.</p>
<p>Its actually a quite good presentation, too bad he ran out of time in the end <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>

	Tags: <a href="http://www.cakephp.nu/t/cakephp" title="Cakephp" rel="tag">Cakephp</a>, <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/fosdem" title="fosdem" rel="tag">fosdem</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/cakephp-talk-fosdem-free-open-source-software-developers-european-meeting/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc

Served from: www.cakephp.nu @ 2012-04-13 09:09:03 -->

