<?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>saltybeagle.com &#187; pear2</title>
	<atom:link href="http://saltybeagle.com/tag/pear2/feed/" rel="self" type="application/rss+xml" />
	<link>http://saltybeagle.com</link>
	<description>All of Brett&#039;s junk.</description>
	<lastBuildDate>Thu, 22 Jul 2010 14:00:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A New PEAR Channel Frontend</title>
		<link>http://saltybeagle.com/2009/12/a-new-pear-channel-frontend/</link>
		<comments>http://saltybeagle.com/2009/12/a-new-pear-channel-frontend/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 03:48:34 +0000</pubDate>
		<dc:creator>bbieber</dc:creator>
				<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[pear2]]></category>

		<guid isPermaLink="false">http://saltybeagle.com/?p=182</guid>
		<description><![CDATA[It seems like PEAR2 has been brewing forever. I mean, we&#8217;ve been talking about PEAR2, namespace usage, and a brand new installer for a long time. But, now that PHP 5.3.0 is a reality and 5.3.1 is so close out the door &#8211; things are actually taking shape and getting to the point where not [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like PEAR2 has been brewing forever. I mean, we&#8217;ve been talking about PEAR2, namespace usage, and a brand new installer for a long time. But, now that PHP 5.3.0 is a reality and 5.3.1 is <del datetime="2009-12-22T03:35:44+00:00">so close</del> out the door &#8211; things are actually taking shape and getting to the point where not only can we show you what we&#8217;ve been working on, but you can actually try things out for yourself.</p>
<p>What I&#8217;ve been working on the past couple of <del datetime="2009-12-22T03:35:44+00:00">days</del> months is a new PEAR channel frontend; the basis for the PEAR2 website. I wanted a simple PEAR channel frontend, that just looks at the local filesystem for all the channel info, and would display the basics: what packages are available, categories, releases etc. Basically, just a simple web view that would not need a database backend, or any complex installation.</p>
<p>It would be simple to create a standalone library that just parsed xml files and read out the data, but having each underlying piece a reusable component would be very beneficial.</p>
<ul>
<li>a simpler XML library for parsing files</li>
<li>an HTTP request library</li>
<li>a library to talk to PEAR channels</li>
<li>a simple templating system with php as the template language</li>
<li>html/css templates to present the content in</li>
</ul>
<p>So when you consider the all the pieces that are required, this is quite an undertaking.</p>
<p>Implementation:</p>
<p>Ordinarily the pear installer, or pyrus, communicates to a PEAR channel through the xml files that describe the packages available. What we&#8217;ve done, is used the installer as the backbone for channel discovery and information retrieval, and we&#8217;ve told it to look at the local filesystem instead of at a remote channel. This is done using a &#8220;filesystem&#8221; adapter for the <a href="http://pear2.php.net/PEAR2_HTTP_Request">PEAR2_HTTP_Request</a> package, which turns your local filesystem into a fake Internet. This is a fairly simple concept, that makes for a very simple PEAR channel frontend.</p>
<p>So, if you couple that model for data retrieval with a completely <a href="http://pear2.php.net/PEAR2_Templates_Savant">new PHP 5.3+ template system</a> with roots in Savant, we&#8217;ve got a really nifty base for building pear channel websites.</p>
<p>So! The package is in the pear2 sandbox and is titled <a href="http://pear2.php.net/PEAR2_SimpleChannelFrontend">PEAR2_SimpleChannelFrontend</a> as a companion to the <a href="http://pear2.php.net/PEAR2_SimpleChannelServer">PEAR2_SimpleChannelServer</a> which makes channel creation (with categories!) a breeze.</p>
<p>I&#8217;ve added it to my <a href="http://pear.saltybeagle.com/">local PEAR channel</a> by simply dropping the .phar file in the web root as index.php, add a small .htaccess file and that&#8217;s all that is needed. Check it out at <a href="http://pear.saltybeagle.com/">http://pear.saltybeagle.com/</a></p>
<p>As of tonight you can try it out for yourself by grabbing the <a href="http://pear2.php.net/get/PEAR2_SimpleChannelFrontend-0.1.0.phar">PEAR2_SimpleChannelFrontend-0.1.0.phar off of the PEAR2 website</a> and saving it along side your channel.xml and browsing to the phar file. I named it <var>index.php</var> for simplicity, and placed the following <var>.htaccess</var> file in place:</p>
<p><code>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . index.php [L]<br />
&lt;/IfModule&gt;</code></p>
<p>Also, my thanks to <a href="http://gluegadget.com/blog/">Amir</a> for the coding help with <a href="http://pear2.php.net/PEAR2_SimpleChannelFrontend">SimpleChannelFrontend</a>, and the <a href="http://pear2.php.net/">pear2 site</a>. Things are moving along quite nicely.</p>
]]></content:encoded>
			<wfw:commentRss>http://saltybeagle.com/2009/12/a-new-pear-channel-frontend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Autoloader That Installs PEAR Packages</title>
		<link>http://saltybeagle.com/2009/11/autoloader-that-installs-pear-packages/</link>
		<comments>http://saltybeagle.com/2009/11/autoloader-that-installs-pear-packages/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 12:23:08 +0000</pubDate>
		<dc:creator>bbieber</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[pear2]]></category>
		<category><![CDATA[pyrus]]></category>

		<guid isPermaLink="false">http://saltybeagle.com/?p=191</guid>
		<description><![CDATA[I had a thought the other night about an autoloader that could install pear packages automatically for you.
Security concerns aside, I thought this would be a fun/juvenile coding experiment, and something that could showcase how easy the pyrus api is for installing PEAR packages. So here it is, pushed out on github &#8211; http://github.com/saltybeagle/AutoloadPackage/blob/master/AutoloadPackage.php
Only 56 [...]]]></description>
			<content:encoded><![CDATA[<p>I had a thought the other night about an autoloader that could <strong>install pear packages automatically</strong> for you.</p>
<p>Security concerns aside, I thought this would be a fun/juvenile coding experiment, and something that could showcase <strong>how easy the pyrus api is</strong> for installing PEAR packages. So here it is, pushed out on github &#8211; <a href="http://github.com/saltybeagle/AutoloadPackage/blob/master/AutoloadPackage.php">http://github.com/saltybeagle/AutoloadPackage/blob/master/AutoloadPackage.php</a></p>
<p>Only <strong>56 lines</strong> of code to have an autoloader that will install a PEAR2 package. Now if that&#8217;s not fun, I don&#8217;t know what is.</p>
<p> <img src='http://saltybeagle.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Oh, and you should really check out <strong>Pyrus, the new PEAR installer</strong>. Get it over at the <a href="http://pear2.php.net/">pear2 website</a> (under construction).</p>
]]></content:encoded>
			<wfw:commentRss>http://saltybeagle.com/2009/11/autoloader-that-installs-pear-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
