<?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>Ben Longden &#187; Uncategorized</title>
	<atom:link href="http://nocarrier.co.uk/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://nocarrier.co.uk</link>
	<description>PHP and some other bits...</description>
	<lastBuildDate>Sat, 28 Jan 2012 12:06:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>REST and the Hypermedia Constraint</title>
		<link>http://nocarrier.co.uk/2012/01/rest-and-the-hypermedia-constraint/</link>
		<comments>http://nocarrier.co.uk/2012/01/rest-and-the-hypermedia-constraint/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 10:39:33 +0000</pubDate>
		<dc:creator>blongden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php rest fdrop]]></category>

		<guid isPermaLink="false">http://nocarrier.co.uk/?p=111</guid>
		<description><![CDATA[<p>The video of my talk at PHPNW &#8217;11 has now been posted online at <a href="http://blip.tv/phpnw/phpnw11-ben-longden-rest-and-hateoas-a-case-study-5858742">blip.tv</a></p> <p>Enjoy!</p>]]></description>
			<content:encoded><![CDATA[<p>The video of my talk at PHPNW &#8217;11 has now been posted online at <a href="http://blip.tv/phpnw/phpnw11-ben-longden-rest-and-hateoas-a-case-study-5858742">blip.tv</a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://nocarrier.co.uk/2012/01/rest-and-the-hypermedia-constraint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My OS X apps</title>
		<link>http://nocarrier.co.uk/2011/11/my-os-x-apps/</link>
		<comments>http://nocarrier.co.uk/2011/11/my-os-x-apps/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 18:28:58 +0000</pubDate>
		<dc:creator>blongden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[osx mac]]></category>

		<guid isPermaLink="false">http://nocarrier.co.uk/?p=89</guid>
		<description><![CDATA[<p>I&#8217;ve had to reinstall OS X Lion in the past few days. Here is a list of apps that I really like (in no particular order)</p> <p>Chrome / Firefox &#8211; Pretty much all that I use Safari for (sorry, apple!)</p> <p>Twitter &#8211; obvious reasons</p> <p>Alfred &#8211; really great app launcher (and other stuff)</p> <p>Caffeine &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had to reinstall OS X Lion in the past few days. Here is a list of apps that I really like (in no particular order)</p>
<p>Chrome / Firefox &#8211; Pretty much all that I use Safari for (sorry, apple!)</p>
<p>Twitter &#8211; obvious reasons</p>
<p>Alfred &#8211; really great app launcher (and other stuff)</p>
<p>Caffeine &#8211; keep your mac awake for longer</p>
<p>Skype &#8211; Well, more out of necessity.</p>
<p>Dropbox &#8211; would have been lost without this!</p>
<p>Virtualbox / vagrant &#8211; dev tools.</p>
<p>Homebrew + git + vim &#8211; more dev tools&#8230;</p>
<p>GitX &#8211; Nice OS X native git gui.</p>
<p>1Password &#8211; Conundrum &#8211; what do you do when your password file is in dropbox, and your dropbox password is in 1Password? Use the iPhone app! Brilliant.</p>
<p>Moom &#8211; really cool window resizing management for OS X</p>
<p>Growl &#8211; part of OS X but deserves a mention for v1.3 in the app store.</p>
<p>iTerm2 &#8211; much nicer than the default Terminal.</p>
<p>I&#8217;ll leave it at that for now. Will update this if I remember anything else that I have missed!</p>
]]></content:encoded>
			<wfw:commentRss>http://nocarrier.co.uk/2011/11/my-os-x-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xhtml as a hypermedia format</title>
		<link>http://nocarrier.co.uk/2011/10/xhtml-as-a-hypermedia-format/</link>
		<comments>http://nocarrier.co.uk/2011/10/xhtml-as-a-hypermedia-format/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 08:34:10 +0000</pubDate>
		<dc:creator>blongden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nocarrier.co.uk/?p=84</guid>
		<description><![CDATA[<p>XHTML is a tempting hypermedia format to use in a web service. A lot of the time, the sort of data that you serve using an API is very similar (if not the same) to what your website displays on its own. XHTML already has all the functionality built in for describing forms, where to [...]]]></description>
			<content:encoded><![CDATA[<p>XHTML is a tempting hypermedia format to use in a web service. A lot of the time, the sort of data that you serve using an API is very similar (if not the same) to what your website displays on its own. XHTML already has all the functionality built in for describing forms, where to post them back to once filled in, how to link to images, documents or any other form of data across the whole web of information.</p>
<p>Despite all this good stuff that you get for free, xhtml, or rather the xhtml media type (application/xhtml+xml) has its problems. And one of those problems is webkit.</p>
<p>Mobile devices are incredibly important in modern web development, so designing for the capabilities of those devices is just part of a standard workflow. The problem however, is that webkit on these devices prefer application/xml and application/xhtml over our friend, text/html. Take a look at the following Accept header sent by two desktop browsers (Firefox and Chrome):<br />
<code><br />
Accept: text/html,application/xhtml+xml,application/xml;q=0.9, */*;q=0.8<br />
</code></p>
<p>Contrast this with what is sent from the iPhone (iOS 4.3.5):<br />
<code><br />
Accept: application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5<br />
</code></p>
<p>And further, and Android phone (2.3.5):</p>
<p><code><br />
Accept: text/xml, text/html, application/xhtml+xml, image/png, text/plain, */*;q=0.8<br />
</code></p>
<p>And suddenly we have a problem. If we use application/xhtml+xml then we have to account for iOS and Android devices preferring it over text/html.</p>
<p>There&#8217;s two things we can do to counter this. The first is to put a filter in front of your application to detect the user agents for browsers that are known to prefer the xml/xhtml representation that we want to reserve for our API clients. This is an application specific solution &#8211; you have to know that the browsers that you are filtering and then rewrite the Accept header so that text/html is served up by your application. You also have to accept that requests from those browsers will never be issuing requests against your web service as those requests will be rewritten to text/html.</p>
<p>The second solution is to use a vendor specific media type, and serve xhtml up on that. This means that you lose a small part of the self describing nature of using application/xhtml+xml &#8211; but means that you can be absolutely certain that no existing browser will prefer your API content over what it should be seeing. Vendor media types take the format of application/vnd.<name>.<subtype> &#8211; for example application/vnd.fdrop.xhtml+xml</p>
<p>Opinions on which of these two options are preferred (or if you have heard of other solutions or have any suggestions on other ways of dealing with this) would be most welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://nocarrier.co.uk/2011/10/xhtml-as-a-hypermedia-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend 5.3 certification</title>
		<link>http://nocarrier.co.uk/2010/11/zend-5-3-certification/</link>
		<comments>http://nocarrier.co.uk/2010/11/zend-5-3-certification/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 23:09:55 +0000</pubDate>
		<dc:creator>blongden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nocarrier.co.uk/?p=60</guid>
		<description><![CDATA[<p>Hurrah! It&#8217;s probably about time I did this&#8230;</p> <p><a href="http://www.zend.com/en/store/education/certification/authenticate.php/ClientCandidateID/ZEND015542/RegistrationID/238383360">Zend Yellow Pages</a></p> <p> </p>]]></description>
			<content:encoded><![CDATA[<p>Hurrah! It&#8217;s probably about time I did this&#8230;</p>
<p><a href="http://www.zend.com/en/store/education/certification/authenticate.php/ClientCandidateID/ZEND015542/RegistrationID/238383360">Zend Yellow Pages</a></p>
<p> <img src='http://nocarrier.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nocarrier.co.uk/2010/11/zend-5-3-certification/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ryan Tomayako &#8211; How I explained REST to my wife</title>
		<link>http://nocarrier.co.uk/2010/10/ryan-tomayako-how-i-explained-rest-to-my-wife/</link>
		<comments>http://nocarrier.co.uk/2010/10/ryan-tomayako-how-i-explained-rest-to-my-wife/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 08:28:32 +0000</pubDate>
		<dc:creator>blongden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[REST web development CS]]></category>

		<guid isPermaLink="false">http://nocarrier.co.uk/?p=56</guid>
		<description><![CDATA[<p>Having attended a talk by David Zuelke on Saturday at the PHPNW Conference 2010, he provided a link at the end of his talk to a blog post by Ryan Tomayoko, titled &#8216;How I explained REST to my wife&#8217;.</p> <p>It&#8217;s a brilliantly simple explanation of something that I have struggled to vocalise for a few [...]]]></description>
			<content:encoded><![CDATA[<p>Having attended a talk by David Zuelke on Saturday at the PHPNW Conference 2010, he provided a link at the end of his talk to a blog post by Ryan Tomayoko, titled &#8216;How I explained REST to my wife&#8217;.</p>
<p>It&#8217;s a brilliantly simple explanation of something that I have struggled to vocalise for a few years!</p>
<p>Here it is in all it&#8217;s glory (don&#8217;t be scared by the size of the page &#8211; it&#8217;s mostly comments!).</p>
<p><a href="http://tomayko.com/writings/rest-to-my-wife">Ryan Tomayoko &#8211; How I explained REST to my Wife</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nocarrier.co.uk/2010/10/ryan-tomayako-how-i-explained-rest-to-my-wife/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buildings a Continuous Integration Server for PHP with Hudson</title>
		<link>http://nocarrier.co.uk/2010/10/buildings-a-continuous-integration-server-for-php-with-hudson/</link>
		<comments>http://nocarrier.co.uk/2010/10/buildings-a-continuous-integration-server-for-php-with-hudson/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 08:48:11 +0000</pubDate>
		<dc:creator>blongden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php hudson]]></category>

		<guid isPermaLink="false">http://nocarrier.co.uk/?p=50</guid>
		<description><![CDATA[<p>An article that I wrote for techPortal has been published.</p> <p><a href="http://techportal.ibuildings.com/2010/09/20/building-a-continuous-integration-server-for-php-with-hudson/">http://techportal.ibuildings.com/2010/09/20/building-a-continuous-integration-server-for-php-with-hudson/</a></p>]]></description>
			<content:encoded><![CDATA[<p>An article that I wrote for techPortal has been published.</p>
<p><a href="http://techportal.ibuildings.com/2010/09/20/building-a-continuous-integration-server-for-php-with-hudson/">http://techportal.ibuildings.com/2010/09/20/building-a-continuous-integration-server-for-php-with-hudson/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nocarrier.co.uk/2010/10/buildings-a-continuous-integration-server-for-php-with-hudson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My solution to the problem of VAT&#8230;</title>
		<link>http://nocarrier.co.uk/2008/11/my-solution-to-the-problem-of-vat/</link>
		<comments>http://nocarrier.co.uk/2008/11/my-solution-to-the-problem-of-vat/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 20:15:28 +0000</pubDate>
		<dc:creator>blongden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://nocarrier.co.uk/?p=8</guid>
		<description><![CDATA[<p>After lot&#8217;s of people spent a lot of time at work refactoring bad/old code after Alistair Darling announced that VAT would be reduced to 15% instead of 17.5% (and that people needed to &#8216;contact their software vendors to update the VAT field&#8230; riiight), I thought i&#8217;d stub out my own design for handling Price and [...]]]></description>
			<content:encoded><![CDATA[<p>After lot&#8217;s of people spent a lot of time at work refactoring bad/old code after Alistair Darling announced that VAT would be reduced to 15% instead of 17.5% (and that people needed to &#8216;contact their software vendors to update the VAT field&#8230; riiight), I thought i&#8217;d stub out my own design for handling Price and Tax (whether it&#8217;s VAT or not shouldn&#8217;t really matter). Here&#8217;s a start. It follows the idea that where possible, a class should be immutable. Don&#8217;t modify an existing cost, create a new one and return that. Anyway &#8211; here&#8217;s the code.</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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Price
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$currency</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #339933;">,</span> <span style="color: #000088;">$currency</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GBP'</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">currency</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$currency</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getValue<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">value</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getCurrency<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">currency</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __toString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$this-&gt;value}</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>That&#8217;s all you should need for the price. Think about the money in your pocket &#8211; it has two property&#8217;s. It has a value, and it has a currency. I cannot change either without spending it (or converting it at a bureau de change), but then I would get a set of new coins in return. It has no concept of whether or not it is inclusive or exclusive of tax. Thats up to something else&#8230;</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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> TaxMan
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">protected</span> static <span style="color: #000088;">$vat</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'GBP'</span> <span style="color: #339933;">=&gt;</span> <span style="color:#800080;">15.0</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$currency</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$currency</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;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$currency</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$vat</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;">-&gt;</span><span style="color: #004000;">currency</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$currency</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> Exception<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Cannot build a TaxMan for this currency'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getVat<span style="color: #009900;">&#40;</span>Price <span style="color: #000088;">$price</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> Price<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$price</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$vat</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">currency</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">currency</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>So we can pass in a price object and get a new value representing how much vat should be added&#8230; Something like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$price</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Price<span style="color: #009900;">&#40;</span><span style="color:#800080;">8.00</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$taxman</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TaxMan<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'GBP'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$vat</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$taxman</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getVat</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$price</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Price<span style="color: #009900;">&#40;</span><span style="color: #000088;">$price</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$vat</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$price</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCurrency</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This is not completely finished however (and I may come back to it to complete it), as it&#8217;s completely possible for multiple different tax levels within a currency (Currency can be used in multiple countries, or different products have varying levels of VAT associated with them). This will solve some of the problem &#8211; but there&#8217;s more work to be done.</p>
]]></content:encoded>
			<wfw:commentRss>http://nocarrier.co.uk/2008/11/my-solution-to-the-problem-of-vat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

