<?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>PHP Conference · Chicago · php&#124;tek 2011</title>
	<atom:link href="http://tek11.phparch.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tek11.phparch.com</link>
	<description>Just another php&#124;architect site</description>
	<lastBuildDate>Mon, 14 Jan 2013 02:33:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>tek11 has come to a close</title>
		<link>http://tek11.phparch.com/2013/01/14/tek11-has-come-to-a-close/</link>
		<comments>http://tek11.phparch.com/2013/01/14/tek11-has-come-to-a-close/#comments</comments>
		<pubDate>Mon, 14 Jan 2013 02:33:35 +0000</pubDate>
		<dc:creator>Eli</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/?p=631</guid>
		<description><![CDATA[As with all good things, tek11 came to a close.  This website exists as an archive of the speakers &#38; sessions that were presented.   Please visit tek.phparch.com for details on upcoming conferences, as well as phparch.com to find out about other conferences we run as well as our other products, such as php&#124;architect magazine, training, [...]]]></description>
			<content:encoded><![CDATA[<p>As with all good things, tek11 came to a close.  This website exists as an archive of the speakers &amp; sessions that were presented.   Please visit <a href="http://tek.phparch.com">tek.phparch.com</a> for details on upcoming conferences, as well as <a href="http://phparch.com/">phparch.com</a> to find out about other conferences we run as well as our other products, such as php|architect magazine, training, and our book series.   Thanks for making tek11 a great experience and we look forward to seeing you at a future conference!</p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2013/01/14/tek11-has-come-to-a-close/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting ready for the TestFest at the Hackathon</title>
		<link>http://tek11.phparch.com/2011/05/20/getting-ready-for-the-testfest-at-the-hackathon/</link>
		<comments>http://tek11.phparch.com/2011/05/20/getting-ready-for-the-testfest-at-the-hackathon/#comments</comments>
		<pubDate>Fri, 20 May 2011 23:22:16 +0000</pubDate>
		<dc:creator>Keith Casey</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/?p=613</guid>
		<description><![CDATA[The following post was written by Rafael Dohms. Chances are if you are not out drinking beer at Shirtless Jim’s or at the Chicago Bull game you will be hanging out at the php&#124;tek Hackathon. Aside from all the cool projects present there, one of the easiest to get involved with is testing PHP. This [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The following post was written by <a title="Rafael Dohms blog" href="http://www.rafaeldohms.com.br/">Rafael Dohms</a>.</strong></p>
<p>Chances are if you are not out drinking beer at Shirtless Jim’s or at the Chicago Bull game you will be hanging out at the php|tek Hackathon. Aside from all the cool projects present there, one of the easiest to get involved with is testing PHP. This is quite simply the action of creating tests in the PHPT format which run regular PHP function through the drills, can’t get any easier then that.</p>
<p>If this strikes your fancy and you would like to contribute to PHP, its important to come to the Hackathon with your ammunition fully packed, so I’m going to give you a few tips to get you going faster:</p>
<p><strong>Setup your Environment</strong></p>
<p>Running PHPT tests is very easy, you just need to compile PHP from source and run make test. So first thing you should do is download the latest source from the website, and compile it, to make sure you have all of the libraries and everything you need to get to the point where you can run tests, follow these steps:</p>
<ol>
<li>wget http://br.php.net/get/php-5.3.6.tar.gz/from/www.php.net/mirror</li>
<li>tar -xvf php-5.3.6.tar.gz</li>
<li>cd php-5.3.6</li>
<li>./configure</li>
<li>make</li>
</ol>
<p>You do not need to run make install, at this point you are perfectly capable of running make test by pointing PHP to your own test directory. Its a good idea to run make install so that you have a working version of the correct PHP release, since PHPT tests are basically PHP code, you can run the test code to copy outputs you can use later testing.</p>
<p><strong>Get to know a bit of PHPT</strong></p>
<p>We will be showing a bit more of this at the hackathon itself, but its a good idea to get used to the PHPT syntax. You can check it out here: <a href="http://qa.php.net/write-test.php">phpt</a>. But the basic test has 3 sections, TEST, FILE, EXPECT. This is how a regular testcase looks like:</p>
<p>&#8211;TEST&#8211;</p>
<p>Hello World Test Description</p>
<p>&#8211;FILE&#8211;</p>
<p>&lt;?php print &#8216;Hello World&#8217; ; ?&gt;</p>
<p>&#8211;EXPECT&#8211;</p>
<p>Hello World</p>
<p><strong>TEST</strong> is the description of the test, what shows up when you are running it<strong></strong></p>
<p><strong>FILE</strong> is the actual code that will be executed by that test. If you run this phpt files as if it were a .php file, this is still actually executed, good debugging.<strong></strong></p>
<p><strong>EXPECT</strong> is an assertion, its what the output of the code in FILE will be checked against.<strong></strong></p>
<p><strong>Figure out what you want to test</strong></p>
<p>Once you know how to run tests and how to write them, the next step is to figure out what you want to test. You can pick: write tests for a bug report or select a piece of code that is not covered yet.</p>
<p><em>If you choose to write tests for a bug</em>, just go to the bug tracker and look for a nice report that you can isolate and replicate in a test, naming convention will be bug[number].phpt</p>
<p><em>If you choose to cover a piece of un-tested code</em>, then you need to get a little comfortable with C and with the GCOV. <a href="http://gcov.php.net/PHP_5_3/lcov_html/">The GCOV page</a> basically tells us which lines of code were executed by our regular test suite, this in terms of C not of PHP, so you need to understand a little of the underlying C structure to identify what function that code belongs to and in which scenario its executed. You can then use the naming convention [function-name]_[basic|variation|error+counter].phpt</p>
<p>We will be looking a little closer at this at the testfest. If you want to get more information and dive a little deeper, check out this <a href="http://www.slideshare.net/sebastian_bergmann/php-testfest-cologne">presentation</a> and they will give you a little more detail on each of these topics, also feel free to ping me on Twitter (<a href="http://twitter.com/#!/rdohms">@rdohms</a>) with questions, and see you at the Hackathon!</p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/05/20/getting-ready-for-the-testfest-at-the-hackathon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hack and win with Tropo at php&#124;tek</title>
		<link>http://tek11.phparch.com/2011/05/13/hack-and-win-with-tropo-at-phptek/</link>
		<comments>http://tek11.phparch.com/2011/05/13/hack-and-win-with-tropo-at-phptek/#comments</comments>
		<pubDate>Fri, 13 May 2011 15:48:22 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/?p=604</guid>
		<description><![CDATA[The following post was written by Adam Kalsey It&#8217;s ironic that most developer conferences are nothing but speakers. It&#8217;s like developers spend all year avoiding meetings so they can come to one event and do nothing but sit in meetings for a few days. I don&#8217;t know about you, but I like my developer conferences [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The following post was written by <a href="http://twitter.com/akalsey">Adam Kalsey</a></strong></p>
<p>It&#8217;s ironic that most developer conferences are nothing but speakers. It&#8217;s like developers spend all year avoiding meetings so they can come to one event and do nothing but sit in meetings for a few days.</p>
<p>I don&#8217;t know about you, but I like my developer conferences to include a little developing.</p>
<p>At php|tek this year, <a href="http://tropo.com/">Tropo</a> is hosting a developer contest and a hackathon on Thursday night. We want to help you take all the ideas you&#8217;re learning at the conference and put them into practice building something useful. We&#8217;re starting the hack-a-thon right after all the sessions are over, so you won&#8217;t even need to miss your favorite speaker.</p>
<p>In addition to Tropo, a large number of other projects will be at the hackathon to help you get started with their stuff. <a href="http://couchdb.apache.org/">CouchDB</a>, <a href="http://getfrapi.com/">Frapi</a>, <a href="http://gowalla.com/">Gowalla</a>, <a href="http://joind.in/">JoindIn</a>, <a href="http://nodejs.org/">Node.js</a>, <a href="http://phergie.org/">Phergie</a>, <a href="http://pear.php.net/">PEAR</a>, <a href="http://qa.php.net/">PHP Core QA</a>, <a href="http://getspaz.com/">Spaz</a>, <a href="http://web2project.net/">web2project</a>, <a href="http://www.microsoft.com/windowsazure/">Windows Azure</a>, and <a href="http://framework.zend.com/">Zend Framework</a> will all be represented, in many cases by the project creators and leads. You don&#8217;t need to hack on one of these projects, of course, but we&#8217;ll all be there to help and answer questions if you want to.</p>
<p>&#8220;But I was going to go grab dinner and a drink!&#8221; you might say. Well, hey, we&#8217;ll have food and drink there, too. &#8220;I was going to hang out with my friends!&#8221; They&#8217;re all going to be there. &#8220;I need to go shoe shopping.&#8221; Uhhh, you&#8217;re on your own there. See you when you get back.</p>
<p>In addition to the Thursday hack event, Tropo&#8217;s putting on a contest. Build an application using Tropo and PHP, and win fabulous prizes. You can work on it at the hack-a-thon or on your own time.</p>
<p>The developer contest runs all through the conference. Heck, start today if you want. <a href="http://tropo.com/">Tropo&#8217;s communications APIs</a> are free for development use and have native PHP support, so there&#8217;s no reason not to enter. Entries are due Friday at 9am and a panel of your brilliant peers will be judging you, or at least your application, to pick a winner to announce at the closing keynote.</p>
<p>The <a href="http://blog.tropo.com/phptek-rules/">Official Rules for this contest can be found on the Tropo site</a>. The highlights are&#8230;</p>
<ul>
<li>Contest open to residents of the 50 United States and DC 13 or older</li>
<li>Eligible entries must use Tropo and PHP</li>
<li>Contest runs from May 12, 2011 12:00am Central time to May 27,<br />
2011 9am Central time</li>
<li>Prizes are an Apple iPad for first place, second place gets a Parrot.AR Drone quadricopter, and third place wins an Amazon Kindle.
</li>
<li>Entries will be judged according to the Extent of Tropo Features Utilized, End User Experience, and Perceived Commercial Viability</li>
<li>To enter, complete the entry form at <a href="http://bit.ly/TropoTek11">http://bit.ly/TropoTek11</a></li>
</ul>
<p>We look forward to seeing you at tek! Bring your questions, your code, and your laptop. We&#8217;ll take care of everything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/05/13/hack-and-win-with-tropo-at-phptek/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hackity Hackity Hackathon!</title>
		<link>http://tek11.phparch.com/2011/05/09/hackity-hackity-hackathon/</link>
		<comments>http://tek11.phparch.com/2011/05/09/hackity-hackity-hackathon/#comments</comments>
		<pubDate>Mon, 09 May 2011 20:13:59 +0000</pubDate>
		<dc:creator>Keith Casey</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Planet Tek]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/?p=573</guid>
		<description><![CDATA[In just two weeks, a flock of PHP developers will descend on Rosemont, IL for php&#124;tek. In between the presentations watched, the Twitter handles followed, and the pints of Guinness consumed, there will be lots of ideas traded. Ideas are great. They can give you solutions, new perspectives, and new directions in your own projects, [...]]]></description>
			<content:encoded><![CDATA[<p>In just two weeks, a flock of PHP developers will descend on Rosemont, IL for php|tek. In between the presentations watched, the Twitter handles followed, and the pints of Guinness consumed, there will be lots of ideas traded. Ideas are great. They can give you solutions, new perspectives, and new directions in your own projects, but they&#8217;re not enough.</p>
<p>We know from thousands of startups and projects.. <em><strong>Execution is everything.</strong></em></p>
<p>On Thursday evening, we&#8217;re running the 2nd annual php|tek Hackathon. This year it&#8217;s sponsored by our friends at <a href="https://www.tropo.com/">Tropo</a>. The goal is to give you a chance to try out some of the ideas you&#8217;ve heard about and potentially help a project that you already use. This time around, we have leaders &amp; community members from a number of projects available to help, direct, and generally <del>talk about</del> <em><strong>show</strong></em> what they&#8217;re doing.</p>
<p>We have quite a few groups represented so far:</p>
<p><a title="Cloud API for adding voice &amp; SMS communications to your applications" href="https://www.tropo.com/">Tropo</a> &#8211; a Cloud API for adding voice &amp; SMS communications to your applications &#8211; represented by Product Manager <a href="http://twitter.com/#!/akalsey">Adam Kalsey</a>.</p>
<p><a title="Apache CouchDB Project" href="http://couchdb.apache.org/">CouchDB</a> &#8211; a document-oriented NoSQL database solution &#8211; represented by CouchBase User Advocate <a href="https://twitter.com/#!/bigbluehat">Benjamin Young</a>.</p>
<p><a title="API framework that puts the “rest” back into RESTful" href="http://getfrapi.com/">Frapi</a> &#8211; an API framework for building RESTful applications &#8211; represented by project creators <a href="http://twitter.com/#!/davidcoallier">David Coallier</a> and <a href="http://twitter.com/#!/h">Helgi Pormar.. Tormar.. we&#8217;ll just go with Helgi</a>.</p>
<p>Gowalla PHP Library &#8211; a way to interact with the Austin-based location based service &#8211; represented by <a href="https://twitter.com/#!/Dragonbe">Michelangelo van Dam</a>.</p>
<p><a title="Presentation &amp; Speaker Rating Site" href="http://joind.in/">JoindIn</a> &#8211; a community-driven site focused on bringing together the people sharing the knowledge with the ones giving feedback &#8211; represented by <a href="https://twitter.com/#!/lornajane">Lorna Jane Mitchell</a>.</p>
<p><a title="An event-driven I/O framework for the V8 JavaScript engine" href="http://nodejs.org/">Node.js</a> &#8211; an event-driven I/O framework for the V8 JavaScript engine &#8211; represented by Node.js author <a href="http://twitter.com/#!/tswicegood">Travis Swicegood</a>.</p>
<p><a title="An open source IRC bot written in PHP 5" href="http://phergie.org/">Phergie</a> &#8211; an open source IRC bot written in PHP 5 &#8211; represented by Project Lead <a href="http://twitter.com/#!/elazar">Matthew Turland</a>.</p>
<p><a title="PHP Extension and Application Repository" href="http://pear.php.net/">PEAR</a> &#8211; PHP Extension and Application Repository &#8211; represented by PEAR President <a href="http://twitter.com/#!/davidcoallier">David Coallier</a>.</p>
<p><a title="a small group of developers whose primary goal is to support the PHP core " href="http://qa.php.net/">PHP Test Fest</a> &#8211; a small group of developers                whose primary goal is to support the PHP core &#8211; represented by <a href="https://twitter.com/#!/Dragonbe">Michelangelo van Dam</a> and <a href="http://twitter.com/#!/rdohms">Rafael Dohms</a>,.</p>
<p><a title="Spaz" href="http://getspaz.com/">Spaz</a> &#8211; the microblogging client for Twitter, Identica, &amp; Laconica &#8211; represented by Project Lead <a href="http://twitter.com/#!/funkatron">Ed &#8220;Funkatron&#8221; Finkler</a>.</p>
<p><a title="web2project: web-based project management" href="http://web2project.net/">web2project</a> &#8211; the stupendous web-based project management system &#8211; represented by the Testing King <a href="http://twitter.com/#!/trevor_morse">Trevor Morse</a> and Project Lead <a href="http://twitter.com/#!/CaseySoftware">Keith Casey</a>.*</p>
<p><a title="Windows-based cloud hosting platform" href="http://www.microsoft.com/windowsazure/">Windows Azure</a> &#8211; Windows-based cloud hosting platform &#8211; represented by Developer Evangelist <a href="http://twitter.com/#!/jrzyshr">Peter Laudati</a>.</p>
<p><a title="Zend Framework" href="http://framework.zend.com/">Zend Framework</a> &#8211; one of the leading PHP frameworks out there &#8211; represented by <a href="https://twitter.com/#!/Dragonbe">Michelangelo van Dam</a>.</p>
<p><em>No, you don&#8217;t <strong>have</strong> to work on one of the projects represented.</em></p>
<p><em> </em>We encourage project members and leaders to attend and direct and focus your efforts so you can accomplish something. Sometimes starting is the hardest step, so we&#8217;re all there to help. If you want to try out your own ideas, please drop me a note &#8211; keith @ blue parabola.com &#8211; and we&#8217;ll make sure everyone knows about it.</p>
<p><em>*  I may be biased about web2project.. I&#8217;m the project lead.</em> ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/05/09/hackity-hackity-hackathon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xapian More Like This In PHP</title>
		<link>http://tek11.phparch.com/2011/04/19/xapian-more-like-this-in-php/</link>
		<comments>http://tek11.phparch.com/2011/04/19/xapian-more-like-this-in-php/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 21:16:42 +0000</pubDate>
		<dc:creator>feed</dc:creator>
				<category><![CDATA[Planet Tek]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/2011/04/19/xapian-more-like-this-in-php/</guid>
		<description><![CDATA[Originally posted at: PHP/ir For my own benefit, if nothing else, since I keep seeming to need this snippet of code, I thought I&#8217;d encapsulate a Xapian More Like This/Find Similar example in a very brief blog post. The code is stolen out of my own Habari MultiSearch plugin: The code is very simple once [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpir.com/atom/1">Originally posted at: PHP/ir</a></p>
<p>For my own benefit, if nothing else, since I keep seeming to need this snippet of code, I thought I&#8217;d encapsulate a Xapian More Like This/Find Similar example in a very brief blog post.</p>
<p>The code is stolen out of my own <a href="http://trac.habariproject.org/habari-extras/browser/plugins/multisearch/trunk">Habari MultiSearch plugin</a>:</p>
</p>
<p>The code is very simple once you get beyond the clunkiness of the Xapian API. We create a relevance set for the document we want to find similar ones to (that&#8217;s the one with id = $search_id), and from that create an eset of the most important terms (Xapian does the heavy lifting here). We then build a new search query out of those, and do a regular query, remember to discard our original document from the search results. Not the slickest solution, but it works!</p>
<p>The basic idea here is actually pretty much the same in most MLT implementations &#8211; what we&#8217;re losing due to the way we&#8217;re adding the terms is any degree of weight &#8211; that term N is more important than term N+1 to the document. Some implementations let you control whether or not those weights have any effect &#8211; in Solr mlt.boost will either include or discard the weighting depending on whether it&#8217;s on or off.</p>
<p><a href="http://phpir.com/atom/1">Original Post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/04/19/xapian-more-like-this-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benford&#8217;s Law</title>
		<link>http://tek11.phparch.com/2011/04/01/benfords-law/</link>
		<comments>http://tek11.phparch.com/2011/04/01/benfords-law/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 15:30:16 +0000</pubDate>
		<dc:creator>feed</dc:creator>
				<category><![CDATA[Planet Tek]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/2011/04/01/benfords-law/</guid>
		<description><![CDATA[Originally posted at: PHP/ir Benfords Law is not an exciting new John Nettles based detective show, but an interesting observation about the distribution of the first digit in sets of numbers originating from various processes. It says, roughly, that in a big collection of data you should expect to see a number starting with 1 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpir.com/atom/1">Originally posted at: PHP/ir</a></p>
<p>Benfords Law is not an exciting new John Nettles based detective show, but an interesting observation about the distribution of the first digit in sets of numbers originating from various processes. It says, roughly, that in a big collection of data you should expect to see a number starting with 1 about 30% of the time, but starting with 9 only about 5% of the time. Precisely, the proportion for a given digit can be worked out as:</p>
<div><span>
<p>&lt;?php</span><br /><span>function</span> benford<span>&#040;</span><span>$num</span><span>&#041;</span> <span>&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>return</span> <span>log10</span><span>&#040;</span>1<span>+</span>1<span>/</span><span>$num</span><span>&#041;</span><span>;</span><br /><span>&#125;</span></p>
</div>
<p>Real data does tend to fit this pretty well. For example, just leaping onto data.gov.uk at random and grabbing a dataset &#8211; in this case a list of spending in the <a href="http://data.gov.uk/dataset/financial-transactions-data-science-and-technology-facilities-council">Science and Technology Facilities Council</a>, I can compare the first digit to Benford&#8217;s expected ones (I grabbed the Amount column out of the april 2010 data and put it into a text file, one amount per line):</p>
<div><span>
<p>&lt;?php</span><br /><span>$fh</span> <span>=</span> <span>fopen</span><span>&#040;</span><span>&quot;data.txt&quot;</span><span>,</span> <span>&#8216;r&#8217;</span><span>&#041;</span><span>;</span><br /><span>$score</span> <span>=</span> <span>array</span><span>&#040;</span><span>&#041;</span><span>;</span><br /><span>$total</span> <span>=</span> <span>0</span><span>;</span><br /><span>$nums</span> <span>=</span> <span>range</span><span>&#040;</span>1<span>,</span> 9<span>&#041;</span><span>;</span><br /><span>// Count up appearances of digits</span><br /><span>while</span><span>&#040;</span><span>$data</span> <span>=</span> <span>fgets</span><span>&#040;</span><span>$fh</span><span>&#041;</span><span>&#041;</span> <span>&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>$total</span><span>++;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>$digit</span> <span>=</span> <span>substr</span><span>&#040;</span><span>trim</span><span>&#040;</span><span>$data</span><span>&#041;</span><span>,</span> 0<span>,</span> 1<span>&#041;</span><span>;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>if</span><span>&#040;</span><span>!</span><span>in_array</span><span>&#040;</span><span>$digit</span><span>,</span> <span>$nums</span><span>&#041;</span><span>&#041;</span> <span>&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span>continue</span><span>;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>if</span><span>&#040;</span><span>!</span><span>isset</span><span>&#040;</span><span>$score</span><span>&#091;</span><span>$digit</span><span>&#093;</span><span>&#041;</span><span>&#041;</span> <span>&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span>$score</span><span>&#091;</span><span>$digit</span><span>&#093;</span> <span>=</span> <span>0</span><span>;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>$score</span><span>&#091;</span><span>$digit</span><span>&#093;</span><span>++;</span><br /><span>&#125;</span><br /><span>arsort</span><span>&#040;</span><span>$score</span><span>&#041;</span><span>;</span><br /><span>echo</span> <span>&quot;# &#8211; Data &nbsp;- Benford&quot;</span><span>,</span> PHP_EOL<span>;</span><br /><span>foreach</span><span>&#040;</span><span>$score</span> <span>as</span> <span>$digit</span> <span>=&gt;</span> <span>$count</span><span>&#041;</span> <span>&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span>echo</span> &nbsp; &nbsp;<span>&quot;<span>$digit</span> &#8211; &quot;</span><span>,</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span>number_format</span><span>&#040;</span><span>$count</span><span>/</span><span>$total</span><span>,</span> <span>3</span><span>&#041;</span><span>,</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span>&quot; &#8211; &quot;</span><span>,</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span>number_format</span><span>&#040;</span>benford<span>&#040;</span><span>$digit</span><span>&#041;</span><span>,</span> 3<span>&#041;</span><span>,</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PHP_EOL<span>;</span><br /><span>&#125;</span></p>
</div>
<p>We get a pretty clear match:</p>
<pre>
# - Data  - Benford
1 - 0.273 - 0.301
2 - 0.181 - 0.176
3 - 0.114 - 0.125
4 - 0.107 - 0.097
5 - 0.088 - 0.079
6 - 0.070 - 0.067
7 - 0.055 - 0.058
8 - 0.050 - 0.051
9 - 0.047 - 0.046
</pre>
<p><img alt="Graph of the STFC versus Beford's Law" src="http://phpir.com/user/files/postim1/Screen shot 2011-04-01 at 16.17.40.png" width="418" height="327" /></p>
<p>This is fun, because if someone makes up a data set, it probably wont follow this distribution. This is used in accountancy to detect fraudulent entries. If there is a reporting limiting at £3000 within a certain company where fraud is going on, there will probably be more dodgy transactions at £2999, for example, which will throw off the stats. More advanced checking actually goes further into the digits rather than just considering the initial one. As always, there&#8217;s plenty more on the law on <a href="http://en.wikipedia.org/wiki/Benford%27s_law">Wikipedia</a>.</p>
<p><a href="http://phpir.com/atom/1">Original Post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/04/01/benfords-law/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tek is goin&#8217; digital!</title>
		<link>http://tek11.phparch.com/2011/03/17/tek-is-goin-digital/</link>
		<comments>http://tek11.phparch.com/2011/03/17/tek-is-goin-digital/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 13:46:24 +0000</pubDate>
		<dc:creator>Marco Tabini</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/?p=517</guid>
		<description><![CDATA[One of the things that I have always wanted to change in our conferences is the way we hand out collateral materials. Typically, we want to make sure that all attendees have ready access to a lot of critical information, such as scheduling, talk synopses, speaker bios, and so on. Similarly, our sponsors also want [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that I have always wanted to change in our conferences is the way we hand  out collateral materials. Typically, we want to make sure that all attendees have ready access to a lot of critical information, such as scheduling, talk synopses, speaker bios, and so on. Similarly, our sponsors also want an opportunity to pass along a handout or two, and maybe a few freebies.</p>
<p>All this paper, sadly, has a very limited shelf life. Conference programs are easily misplaced, pamphlets are often discarded, and so on, and so forth. The end result is an enormous amount of waste—I’m pretty sure that, last year, we probably shipped, handled, and handed out at least 500lbs. of paper—and less value than everyone would like.</p>
<p>This year, therefore, we have set out to “go digital” and limit our paper usage as much as possible. As part of this initiative, we are going to introduce a few changes:</p>
<ul>
<li>First of all, we won’t have bag or handouts. Instead, <strong>we’ll give all attendees a USB key</strong> with all the materials, including cool demos and software from our sponsors. </li>
<li>The <strong>conference program</strong> is going digital, as well—we’ll make it available for download in PDF, ePub, and MOBI format so that you can pick it up and install it on your computer or e-book reader of choice.</li>
<li>We are hard at work on a <strong>mobile app</strong> for the conference—it will let you consult the schedule and speaker bios, create your own custom schedule, and interact with the other attendees using group messaging. It’ll be a great way to keep on top of things (including the many and sundry evening activities) without having to reach for a piece of paper all the time. Oh, and the app will work on Android, iOS, and Windows Phone 7 devices (pending, of course, approval from Apple and Microsoft).</li>
<li>If you don’t happen to have a smartphone, don’t worry: we are still going to print schedules, but these will be on lightweight postcards that are easier to carry around and don’t create too much clutter.</li>
</ul>
<p>The app is chugging along rather nicely—we are testing the iOS prototype and are going to start working on the Android and WP7 versions shortly. Once it’s complete, we plan on open-sourcing the mobile app, in the hopes that other conference and user-group organizers will find it useful to help reduce their environmental footprint as well (and maybe help making it an even better app!).</p>
<p>There you have it, then. We’re goin’ digital, and we hope that you will be there to enjoy the wonders of technology with us (while having a smashing good time with your friends and colleagues from the PHP community).</p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/03/17/tek-is-goin-digital/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conferences (with Discount!)</title>
		<link>http://tek11.phparch.com/2011/02/23/conferences-with-discount/</link>
		<comments>http://tek11.phparch.com/2011/02/23/conferences-with-discount/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 20:15:15 +0000</pubDate>
		<dc:creator>feed</dc:creator>
				<category><![CDATA[Planet Tek]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/2011/02/23/conferences-with-discount/</guid>
		<description><![CDATA[Once again, a complete lack of new content on this blog is marginally explained by conference activity. I recently spoke about different deployment options at the ThinkVitamin Code Management &#038; Deployment online conference, if you&#8217;re interested check the Deployment Tactics slides on slideshare. In a few weeks time I&#8217;ll be talking about ZeroMQ at the [...]]]></description>
			<content:encoded><![CDATA[<p>Once again, a complete lack of new content on this blog is marginally explained by conference activity. I recently spoke about different deployment options at the ThinkVitamin <a href="http://thinkvitamin.com/online-conferences/code-manage-deploy">Code Management &#038; Deployment</a> online conference, if you&#8217;re interested check the <a href="http://www.slideshare.net/IanBarber/deployment-tactics-6725109">Deployment Tactics slides</a> on slideshare.</p>
<p>In a few weeks time I&#8217;ll be talking about <a href="http://zeromq.org">ZeroMQ</a> at the excellent <a href="http://phpconference.co.uk/">PHP UK Conference</a> in London on the 25th of Feb, and if you haven&#8217;t already got a ticket you can get one for £20 off thanks to a <a href="</p>
<p>http://www.phpconference.co.uk/registration/speakers/followers</p>
<p>"> PHPUK followers discount</a>. Search fans may be interested in talks on <a href="http://phpconference.co.uk/talks#Problems_But_The_Search_Ain-t_One">Elastic Search</a>, by <a href="http://zmievski.org/">@a</a>, <a href="http://phpconference.co.uk/talks#Large-Scale_Data_Processing_with_MapReduce_and_PHP">hadoop</a> by <a href="http://twitter.com/dzuelke">@dzuelke</a>, and a <a href="http://phpconference.co.uk/talks#NoSQL_Databases:_What_When_and_Why">NoSQL comparison</a> by <a href="http://www.alberton.info">@lorenzoalberton</a>.</p>
<p>After that, it&#8217;s off to Canadia in March to the monstrous <a href="http://confoo.ca/en">ConFoo</a>, where I&#8217;ll be talking about doing Solr properly (and Andrei is doing his Elastic Search talk again, for double the Lucene pleasure), then in May to Chicago for <a href="http://tek11.phparch.com/">PHP Tek</a>, where I&#8217;ll be talking about ZeroMQ, Debugging, and Finding Fraudsters (with the help of some machine learning techniques).</p>
<p><a href="http://www.confoo.ca/en/schedule" lang="en"><img alt="I am speaking at ConFoo Web Techno Conference. March 9th to 11th 2011. Montreal" width="150" height="100" src="http://confoo.ca/images/propaganda/2011/en/speaking.jpg" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/02/23/conferences-with-discount/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using your own View object with Zend_Application</title>
		<link>http://tek11.phparch.com/2011/02/16/using-your-own-view-object-with-zend_application/</link>
		<comments>http://tek11.phparch.com/2011/02/16/using-your-own-view-object-with-zend_application/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 12:00:40 +0000</pubDate>
		<dc:creator>feed</dc:creator>
				<category><![CDATA[Planet Tek]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/?p=494</guid>
		<description><![CDATA[Originally posted at: Rob Allen&#8217;s DevNotes Let&#8217;s say that you want to use your own view object within your Zend Framework application. Creating the view object is easy enough in library/App/View.php: class&#160;App_View&#160;extends&#160;Zend_View { &#160;&#160;&#160;&#160;//&#160;custom&#160;methods&#160;here } along with adding the App_ namespace to the the autoloader in application.ini: autoloadernamespaces[]&#160;=&#160;"App_" All we need to now is get [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://akrabat.com/feed/">Originally posted at: Rob Allen&#8217;s DevNotes</a></p>
<p>Let&#8217;s say that you want to use your own view object within your Zend Framework application.</p>
<p>Creating the view object is easy enough in <tt>library/App/View.php</tt>:</p>
<pre><span>class&nbsp;App_View&nbsp;</span><span>extends&nbsp;</span><span>Zend_View
</span><span>{
&nbsp;&nbsp;&nbsp;&nbsp;</span><span>//&nbsp;custom&nbsp;methods&nbsp;here
</span><span>}</span>
</span></code></pre>
<p>along with adding the <tt>App_</tt> namespace to the the autoloader in <tt>application.ini</tt>:</p>
<pre><span>autoloadernamespaces</span><span>[]&nbsp;=&nbsp;</span><span>"App_"</span>
</span></code></pre>
<p>All we need to now is get Zend_Application to bootstrap with our new view class. There are two ways of doing this: within <tt>Bootstrap.php</tt> or using a custom resource.</p>
<h3>_initView() in Bootstrap.php</h3>
<p>At first blush, the code looks quite easy. In <tt>application/Bootstrap.php</tt>, we add our own method that creates the view object and assigns it to the viewRenderer:</p>
<pre><span>
</span><span>class&nbsp;</span><span>Bootstrap&nbsp;</span><span>extends&nbsp;</span><span>Zend_Application_Bootstrap_Bootstrap
</span><span>{
&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;function&nbsp;</span><span>_initView</span><span>()
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$view&nbsp;</span><span>=&nbsp;new&nbsp;</span><span>App_View</span><span>();

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$viewRenderer&nbsp;</span><span>=&nbsp;new&nbsp;</span><span>Zend_Controller_Action_Helper_ViewRenderer</span><span>();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$viewRenderer</span><span>-&gt;</span><span>setView</span><span>(</span><span>$view</span><span>);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>Zend_Controller_Action_HelperBroker</span><span>::</span><span>addHelper</span><span>(</span><span>$viewRenderer</span><span>);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span>$view</span><span>;
&nbsp;&nbsp;&nbsp;&nbsp;}
}
</span>
</span></code></pre>
<p>As we have named the method <tt>_initView()</tt>, our method will take precedence over the built in View resource and be used instead. However, this implementation will ignore any view options that are configured in <tt>application.ini</tt> using the <tt>resources.view</tt> key, so a better method is this:</p>
<pre><span>class&nbsp;Bootstrap&nbsp;</span><span>extends&nbsp;</span><span>Zend_Application_Bootstrap_Bootstrap
</span><span>{
&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;function&nbsp;</span><span>_initView</span><span>()
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$resources&nbsp;</span><span>=&nbsp;</span><span>$this</span><span>-&gt;</span><span>getOption</span><span>(</span><span>'resources'</span><span>);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$options&nbsp;</span><span>=&nbsp;array();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(isset(</span><span>$resources</span><span>[</span><span>'view'</span><span>]))&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$options&nbsp;</span><span>=&nbsp;</span><span>$resources</span><span>[</span><span>'view'</span><span>];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$view&nbsp;</span><span>=&nbsp;new&nbsp;</span><span>App_View</span><span>(</span><span>$options</span><span>);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(isset(</span><span>$options</span><span>[</span><span>'doctype'</span><span>]))&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$view</span><span>-&gt;</span><span>doctype</span><span>()-&gt;</span><span>setDoctype</span><span>(</span><span>strtoupper</span><span>(</span><span>$options</span><span>[</span><span>'doctype'</span><span>]));
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(isset(</span><span>$options</span><span>[</span><span>'charset'</span><span>])&nbsp;&amp;&amp;&nbsp;</span><span>$view</span><span>-&gt;</span><span>doctype</span><span>()-&gt;</span><span>isHtml5</span><span>())&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$view</span><span>-&gt;</span><span>headMeta</span><span>()-&gt;</span><span>setCharset</span><span>(</span><span>$options</span><span>[</span><span>'charset'</span><span>]);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(isset(</span><span>$options</span><span>[</span><span>'contentType'</span><span>]))&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$view</span><span>-&gt;</span><span>headMeta</span><span>()-&gt;</span><span>appendHttpEquiv</span><span>(</span><span>'Content-Type'</span><span>,&nbsp;</span><span>$options</span><span>[</span><span>'contentType'</span><span>]);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$viewRenderer&nbsp;</span><span>=&nbsp;new&nbsp;</span><span>Zend_Controller_Action_Helper_ViewRenderer</span><span>();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$viewRenderer</span><span>-&gt;</span><span>setView</span><span>(</span><span>$view</span><span>);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>Zend_Controller_Action_HelperBroker</span><span>::</span><span>addHelper</span><span>(</span><span>$viewRenderer</span><span>);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span>$view</span><span>;
&nbsp;&nbsp;&nbsp;&nbsp;}

}</span>
</span></code></pre>
<p>This version takes into account your configuration settings and behaves the same as the View resource provided by Zend Framework. The only difference is that we&#8217;re now using <tt>App_View</tt>.</p>
<h3>Custom resource</h3>
<p>Another option is to override <tt>Zend_Application_Resource_View</tt> with our own view resource. In this case, we create a class called <tt>App_Resource_View</tt> stored in <tt>library/App/Resource/View.php</tt>. We only need to override one method, <tt>getView()</tt>:</p>
<pre><span>class&nbsp;App_Resource_View&nbsp;</span><span>extends&nbsp;</span><span>Zend_Application_Resource_View
</span><span>{
&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span>getView</span><span>()
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span>null&nbsp;</span><span>===&nbsp;</span><span>$this</span><span>-&gt;</span><span>_view</span><span>)&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$options&nbsp;</span><span>=&nbsp;</span><span>$this</span><span>-&gt;</span><span>getOptions</span><span>();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$this</span><span>-&gt;</span><span>_view&nbsp;</span><span>=&nbsp;new&nbsp;</span><span>App_View</span><span>(</span><span>$options</span><span>);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(isset(</span><span>$options</span><span>[</span><span>'doctype'</span><span>]))&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$this</span><span>-&gt;</span><span>_view</span><span>-&gt;</span><span>doctype</span><span>()-&gt;</span><span>setDoctype</span><span>(</span><span>strtoupper</span><span>(</span><span>$options</span><span>[</span><span>'doctype'</span><span>]));
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(isset(</span><span>$options</span><span>[</span><span>'charset'</span><span>])&nbsp;&amp;&amp;&nbsp;</span><span>$this</span><span>-&gt;</span><span>_view</span><span>-&gt;</span><span>doctype</span><span>()-&gt;</span><span>isHtml5</span><span>())&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$this</span><span>-&gt;</span><span>_view</span><span>-&gt;</span><span>headMeta</span><span>()-&gt;</span><span>setCharset</span><span>(</span><span>$options</span><span>[</span><span>'charset'</span><span>]);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(isset(</span><span>$options</span><span>[</span><span>'contentType'</span><span>]))&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>$this</span><span>-&gt;</span><span>_view</span><span>-&gt;</span><span>headMeta</span><span>()-&gt;</span><span>appendHttpEquiv</span><span>(</span><span>'Content-Type'</span><span>,&nbsp;</span><span>$options</span><span>[</span><span>'contentType'</span><span>]);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span>$this</span><span>-&gt;</span><span>_view</span><span>;
&nbsp;&nbsp;&nbsp;&nbsp;}
}</span>
</span></code></pre>
<p>Essentially, all I have done is replace the class of the view object to be App_View and left everything else alone so that it behaves the same as the default View resource.</p>
<p>To get Zend_Application to load our custom resource, we just add one line to <tt>application.ini</tt>:</p>
<pre><span>pluginPaths</span><span>.</span><span>App_Resource&nbsp;</span><span>=&nbsp;</span><span>"App/Resource"</span>
</span></code></pre>
<p>We now have a reusable resource that will load our own View class and can easily take it from project to project.</p>
<p><a href="http://akrabat.com/feed/">Original Post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/02/16/using-your-own-view-object-with-zend_application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check it out, schedule is up!</title>
		<link>http://tek11.phparch.com/2011/02/14/check-it-out-schedule-is-up/</link>
		<comments>http://tek11.phparch.com/2011/02/14/check-it-out-schedule-is-up/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 16:57:12 +0000</pubDate>
		<dc:creator>Cal Evans</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[schedule]]></category>
		<category><![CDATA[tek11]]></category>

		<guid isPermaLink="false">http://tek11.phparch.com/?p=435</guid>
		<description><![CDATA[All of us here at php&#124;architect have been working like monkeys (some more like monkeys than others) to get all the details of the tek11 schedule on-line. We are happy to say that everything is now on-line and in place. Now only do we have the schedule page up but now all the author pictures [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.phparch.com/wp-content/uploads/2011/02/TEK-solo.png"><img src="http://www.phparch.com/wp-content/uploads/2011/02/TEK-solo-e1297699282665-150x81.png" alt="" title="TEK-solo" width="150" height="81" class="alignleft size-thumbnail wp-image-6368" /></a>All of us here at php|architect have been working like monkeys (some more like monkeys than others) to get all the details of the <a href="http://tek11.phparch.com/schedule/">tek11 schedule</a> on-line. We are happy to say that everything is now on-line and in place. Now only do we have the schedule page up but now all the <a href="http://tek11.phparch.com/speakers/">author pictures and biographies</a> are up along with complete <a href="http://tek11.phparch.com/talk-synopses/">descriptions of the talks</a>.</p>
<p>tek11 will continue the five year tradition of the PHP community gathering in Chicago to share ideas and inspiration. Last year,<a href="http://joind.in/event/view/137"> a great time was had by all</a> and this year will be no different. Get your ticket today and make sure you are there in May!</p>
]]></content:encoded>
			<wfw:commentRss>http://tek11.phparch.com/2011/02/14/check-it-out-schedule-is-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
