<?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>a work on process &#187; PEAR</title>
	<atom:link href="http://jystewart.net/process/tag/PEAR/feed/" rel="self" type="application/rss+xml" />
	<link>http://jystewart.net/process</link>
	<description>notes from another web developer</description>
	<lastBuildDate>Tue, 27 Jul 2010 09:53:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>XML_Feed_Parser: Handing over the reins</title>
		<link>http://jystewart.net/process/2008/12/xml_feed_parser-handing-over-the-reins/</link>
		<comments>http://jystewart.net/process/2008/12/xml_feed_parser-handing-over-the-reins/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 11:45:36 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[moving on]]></category>
		<category><![CDATA[opportunities]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XML_Feed_Parser]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/?p=512</guid>
		<description><![CDATA[For the past few years I&#8217;ve been maintaining a PHP package called XML_Feed_Parser. It&#8217;s part of PEAR and attempts to offer a unified API for handling RSS and Atom feeds in your PHP code, a little inspired by projects like the universal feed parser. Its parsing and API are pretty comprehensive, but lately I&#8217;ve been <a href="http://jystewart.net/process/2008/12/xml_feed_parser-handing-over-the-reins/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>For the past few years I&#8217;ve been maintaining a PHP package called <a href="http://pear.php.net/package/XML_Feed_Parser">XML_Feed_Parser</a>. It&#8217;s part of PEAR and attempts to offer a unified API for handling RSS and Atom feeds in your PHP code, a little inspired by projects like the universal feed parser. Its parsing and API are pretty comprehensive, but lately I&#8217;ve been falling a bit behind in managing it and there are aspects that could definitely do with some attention.</p>
<p>So I&#8217;m looking to hand it all over to someone with more time and energy for it than I. Preferably someone who uses it in an active project (being primarily a ruby developer these days, I spend a lot more time with <a href="http://rubyforge.org/projects/feedtools/">feedtools</a> than with my own package). I&#8217;m going to mark the package as &#8216;unmaintained&#8217; and if you want to take it on, take a look at <a href="http://pear.php.net/manual/en/newmaint.takingover.php">the appropriate page in the manual</a>.</p>
<p>And if you want the full story of why I&#8217;ve chosen now to make this move, it&#8217;s made fairly clear on <a href="http://flickr.com/photos/jystewart/3083876687/">flickr</a> and <a href="http://james.anthropiccollective.org/2008/12/a-quick-announcement-in-lieu-of-a-more-complete-update/">my other blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2008/12/xml_feed_parser-handing-over-the-reins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A couple of releases</title>
		<link>http://jystewart.net/process/2007/04/a-couple-of-releases/</link>
		<comments>http://jystewart.net/process/2007/04/a-couple-of-releases/#comments</comments>
		<pubDate>Mon, 09 Apr 2007 14:59:33 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Services_Technorati]]></category>
		<category><![CDATA[Technorati API]]></category>
		<category><![CDATA[XML_Feed_Parser]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/2007/04/a-couple-of-releases/</guid>
		<description><![CDATA[In the process of catching up with some neglected tasks, I&#8217;ve pushed out new releases of both of my PEAR packages.
Services_Technorati receives a version number bump, and little else. The alpha release was never meant to last quite this long given that it&#8217;s merely a port of a very stable package, and it&#8217;s finally marked <a href="http://jystewart.net/process/2007/04/a-couple-of-releases/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>In the process of catching up with some neglected tasks, I&#8217;ve pushed out new releases of both of my <a href="http://pear.php.net/">PEAR</a> packages.</p>
<p><a href="http://pear.php.net/packages/Services_Technorati">Services_Technorati</a> receives a version number bump, and little else. The alpha release was never meant to last quite this long given that it&#8217;s merely a port of a very stable package, and it&#8217;s finally marked beta. My hope is that the beta release will pick up a few more users to put it through its paces.</p>
<p>I had wondered about adding in some extra classes to encapsulate responses, but at the end of the day <a href="http://php.net/simplexml">simplexml</a> does a decent job, is well documented, and doesn&#8217;t add any overhead, so I&#8217;m happy just returning its objects and letting people work with them.</p>
<p>There are also a couple of bug fixes for the stable release of <a href="http://pear.php.net/package/XML_Feed_Parser">XML_Feed_Parser</a>, kindly contributed by users. There are still a couple of <a href="http://pear.php.net/bugs/search.php?cmd=display&#038;package_name%5B%5D=XML_Feed_Parser">outstanding tickets</a>, but they&#8217;re issues which require more thought so I&#8217;m postponing them for 1.0.3 or 1.1.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2007/04/a-couple-of-releases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Services_Technorati version 2</title>
		<link>http://jystewart.net/process/2007/02/services_technorati-version-2/</link>
		<comments>http://jystewart.net/process/2007/02/services_technorati-version-2/#comments</comments>
		<pubDate>Fri, 23 Feb 2007 15:51:21 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP5]]></category>
		<category><![CDATA[Services_Technorati]]></category>
		<category><![CDATA[simplexml]]></category>
		<category><![CDATA[Technorati]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/archives/2007/02/services_technorati-version-2/</guid>
		<description><![CDATA[In an effort to tidy up various older projects that were never quite completed, I&#8217;ve turned my attention to my first PEAR module Services_Technorati. It&#8217;s a very simple wrapper around the Technorati API, but the PHP4 version never reached a stable release as it depended on some other packages which were also never stabilised.
So it <a href="http://jystewart.net/process/2007/02/services_technorati-version-2/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>In an effort to tidy up various older projects that were never quite completed, I&#8217;ve turned my attention to my first PEAR module <a href="http://pear.php.net/package/Services_Technorati">Services_Technorati</a>. It&#8217;s a very simple wrapper around the <a href="http://www.technorati.com/developers/api/">Technorati API</a>, but the PHP4 version never reached a stable release as it depended on some other packages which were also never stabilised.</p>
<p>So it seemed time to make the simple step of converting the code to be PHP5-only and use simplexml for their XML parsing. That removes the dependencies which were slowing me down, and should result in improved speed along the way as the XML parsing is now handled in C rather than PHP. I just released 2.0.0alpha1, but the code should be pretty stable and I&#8217;m hoping to run through the steps and get a stable release out very soon.</p>
<p><strong>Update (27th Feb): I&#8217;ve just pulled this release and re-released it as 0.7.0. Apparently because the package never release 1.0 in its original version, I should just continue with the previous version numbers despite the change to PHP5.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2007/02/services_technorati-version-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XML_Feed_Parser stable</title>
		<link>http://jystewart.net/process/2006/12/xml_feed_parser-stable/</link>
		<comments>http://jystewart.net/process/2006/12/xml_feed_parser-stable/#comments</comments>
		<pubDate>Tue, 26 Dec 2006 21:25:59 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Feed Parser]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/archives/2006/12/xml_feed_parser-stable/</guid>
		<description><![CDATA[I&#8217;ve just released the first stable version of my XML_Feed_Parser library through PEAR. I&#8217;ve been working on the code for about 18 months now, it&#8217;s nearly a year since the first beta, and some time since I last had to make any significant changes, so it seemed like it was time to open it up <a href="http://jystewart.net/process/2006/12/xml_feed_parser-stable/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released the first stable version of my <a href="http://pearp.php.net/package/XML_Feed_Parser">XML_Feed_Parser</a> library through <a href="http://pearp.php.net/">PEAR</a>. I&#8217;ve been working on the code for about 18 months now, it&#8217;s nearly a year since the first beta, and some time since I last had to make any significant changes, so it seemed like it was time to open it up to a wider audience.</p>
<p>You can get it through the usual channels, either downloading it directly or using the PEAR installer, and PEAR provides a bug tracker should you find any problems or have ideas for enhancements. My time to implement enhancements will be very limited, so I&#8217;m also very interested in hearing from anyone who&#8217;d like to sign on as a developer to help keep the package moving forwards.</p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2006/12/xml_feed_parser-stable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML_Feed_Parser RC2</title>
		<link>http://jystewart.net/process/2006/11/xml_feed_parser-rc2/</link>
		<comments>http://jystewart.net/process/2006/11/xml_feed_parser-rc2/#comments</comments>
		<pubDate>Thu, 09 Nov 2006 15:24:05 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Feed Parser]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/archives/2006/11/xml_feed_parser-rc2/</guid>
		<description><![CDATA[I just rolled and released a second release candidate of XML_Feed_Parser. Mohanaraj Gopala Krishnan had pointed out to me that the parsing of atom text constructs wasn&#8217;t quite as flexible as the RFC allows for and was kind enough to supply an initial patch to improve support.
Since HTML_Safe isn&#8217;t stable yet my plan is to <a href="http://jystewart.net/process/2006/11/xml_feed_parser-rc2/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I just rolled and released a second release candidate of <a href="http://pear.php.net/package/XML_Feed_Parser">XML_Feed_Parser</a>. Mohanaraj Gopala Krishnan had pointed out to me that the parsing of atom text constructs wasn&#8217;t quite as flexible as <a href="ftp://ftp.rfc-editor.org/in-notes/rfc4287.txt">the RFC</a> allows for and was kind enough to supply an initial patch to improve support.</p>
<p>Since <a href="http://pear.php.net/package/HTML_Safe">HTML_Safe</a> isn&#8217;t stable yet my plan is to put clear security advice in the manual and then if there aren&#8217;t any new issues with this release candidate to release it as a stable version. Once HTML_Safe stabilises I&#8217;ll revise the manual, work in support for that and release a new version.</p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2006/11/xml_feed_parser-rc2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>XML_Feed_Parser Release Candidate</title>
		<link>http://jystewart.net/process/2006/07/xml_feed_parser-release-candidate/</link>
		<comments>http://jystewart.net/process/2006/07/xml_feed_parser-release-candidate/#comments</comments>
		<pubDate>Thu, 27 Jul 2006 12:11:16 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[XML_Feed_Parser]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/archives/2006/07/xml_feed_parser-release-candidate/</guid>
		<description><![CDATA[The first release of XML_Feed_Parser in six months is out the door, and it&#8217;s the first (and hopefully only) release candidate. I&#8217;ve had several people email me with questions about the package in the past few weeks, most of whom are using it successfully and wanted to see a stable release soon, so it seemed <a href="http://jystewart.net/process/2006/07/xml_feed_parser-release-candidate/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>The first release of <a href="http://pear.php.net/package/XML_Feed_Parser">XML_Feed_Parser</a> in six months is out the door, and it&#8217;s the first (and hopefully only) release candidate. I&#8217;ve had several people email me with questions about the package in the past few weeks, most of whom are using it successfully and wanted to see a stable release soon, so it seemed time to get moving on that.</p>
<p>This release fixes a few small bugs, mostly related to the packaging rather than to its operation, and I&#8217;m now bundling the various Relax NG schemas used for validation to save on HTTP requests. There is <a href="http://pear.php.net/bugs/bug.php?id=7550">one open ticket</a> that I&#8217;ll need to attend to, and then all should be ready for 1.0.</p>
<p>I&#8217;ve had a few requests for improvements to the package, mainly relating to improved handling of extensions, such as those beginning to appear for atom, but I decided to save those for a later (1.1?) release. If anyone would like to join me as a developer to work on those, I&#8217;d definitely welcome more involvement.</p>
<p><!-- Technorati Tags Start --></p>
<p><!-- Technorati Tags End --></p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2006/07/xml_feed_parser-release-candidate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Granting and Checking Permissions with LiveUser</title>
		<link>http://jystewart.net/process/2006/02/permissions-with-liveuser/</link>
		<comments>http://jystewart.net/process/2006/02/permissions-with-liveuser/#comments</comments>
		<pubDate>Thu, 16 Feb 2006 03:52:31 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[authorization]]></category>
		<category><![CDATA[LiveUser]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/archives/2006/02/granting-and-checking-permissions-with-liveuser/</guid>
		<description><![CDATA[I was reminded by maxi_million in the comments on one of my previous LiveUser tutorial entries that I never completed the promised third entry in that series. After the initial procrastination wore off and I initially turned my mind to writing this piece, my main project using LiveUser ended up being converted (for various reasons) <a href="http://jystewart.net/process/2006/02/permissions-with-liveuser/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I was reminded by maxi_million in the comments on <a href="http://jystewart.net/process/archives/2005/08/getting-started-with-liveuser-permissions/#comment-937">one of my previous LiveUser tutorial entries</a> that I never completed the promised third entry in that series. After the initial procrastination wore off and I initially turned my mind to writing this piece, my main project using <a href="http://pear.php.net/package/Liveuser">LiveUser</a> ended up being converted (for various reasons) into a <a href="http://www.drupal.org">drupal</a> site, so my further use of the library has been quite minimal. But I do have a little code sitting around, so will try and draw together a few notes on how I was using Liveuser.</p>
<p>While many powerful authorization systems are purely role-based, something that can be achieved in LiveUser with the groups functionality covered in the previous entry on this subject, LiveUser also supports much more fine grained permissions. Each permission is its own entity, and permissions are grouped into areas. I created my areas directly in the database so won&#8217;t be covering that here. Once you have your area&#8217;s id in the variable $area_id and an instance of LiveUser_Admin in $admin you can call:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$right</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">perm</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addRight</span><span style="color: #009900;">&#40;</span>
  <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'area_id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$area_id</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'right_define_name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'a name for your right'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>to create the right and capture its ID in $right.</p>
<p>You can then &#8216;grant&#8217; that right to a user with:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">perm</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">grantUserRight</span><span style="color: #009900;">&#40;</span>
  <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'right_id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$right</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'perm_user_id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$perm_user_id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Or grant it to a group with:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">perm</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">grantGroupRight</span><span style="color: #009900;">&#40;</span>
  <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'right_id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$right</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'group_id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$group_id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Where I ran into problems was when I attempted to check those permissions. From the API documentation, it wasn&#8217;t clear how to check for a right given only its name, but after a little exploration I put together the following method (used within my wrapper class) that handles it. $this->user is an instance of LiveUser and $this->admin is an instance of LiveUser_Admin:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> checkRight<span style="color: #009900;">&#40;</span><span style="color: #000088;">$area_id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$right_desc</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;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</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;">getAdminInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000088;">$filter</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">&quot;fields&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;right_id&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">&quot;filters&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
      <span style="color: #0000ff;">&quot;area_id&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$area_id</span><span style="color: #339933;">,</span>
      <span style="color: #0000ff;">&quot;right_define_name&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$right_desc</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$rights</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_keys</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRights</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filter</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$right_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$rights</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user</span><span style="color: #339933;">-&gt;</span>_perm<span style="color: #339933;">-&gt;</span><span style="color: #004000;">checkRight</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$right_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>You&#8217;ll note that the final line makes use of the _perm property. In PEAR coding conventions a preceding underscore means a method or property is private and should not be accessed from outside the class, but this was the neatest approach I was able to find in the time. If anyone can tell me how to do this within the approved public API I&#8217;ll happily update this entry.</p>
<p>Update: Be sure to check out the comments, where <a href="http://pooteeweet.org/blog/">Lukas</a> has been adding some very useful information.</p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2006/02/permissions-with-liveuser/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Feed Parser: First Beta</title>
		<link>http://jystewart.net/process/2006/01/feed-parser-first-beta/</link>
		<comments>http://jystewart.net/process/2006/01/feed-parser-first-beta/#comments</comments>
		<pubDate>Wed, 11 Jan 2006 20:10:45 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[Parser]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[XML_Feed_Parser]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/archives/2006/01/feed-parser-first-beta/</guid>
		<description><![CDATA[I promised more work on XML_Feed_Parser this month and am pleased to say I found the time. The first beta, version 0.3, is on its way into PEAR.
Two key developments in this version are support for the &#8216;content&#8217; module in RSS2 and fix of a serious bug in the main __call method. I was accessing <a href="http://jystewart.net/process/2006/01/feed-parser-first-beta/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I promised more work on <a href="http://pear.php.net/package/XML_Feed_Parser">XML_Feed_Parser</a> this month and am pleased to say I found the time. The first beta, version 0.3, is on its way into PEAR.</p>
<p>Two key developments in this version are support for the &#8216;content&#8217; module in RSS2 and fix of a serious bug in the main __call method. I was accessing the compatMap variable (that handles the mapping of element names between different syndication formats) directly, and calling <a href="http://php.net/array_pop">array_pop</a> on it. That threw up problems if you wanted to access the same element multiple times, so I&#8217;ve added in a temporary variable to fix that.</p>
<p>The main development, however, is experimental support for the <a href="http://php.net/tidy">tidy</a> library. If you think (or know) the feed you&#8217;re working with might not be valid XML, you can now choose to have tidy clean up the code before it gets handed to the DOM. Handling ill-formed XML is a much requested feature, and initial testing of this solution yields positive results.</p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2006/01/feed-parser-first-beta/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XML_Feed_Parser 0.2.8</title>
		<link>http://jystewart.net/process/2005/12/xml_feed_parser-028/</link>
		<comments>http://jystewart.net/process/2005/12/xml_feed_parser-028/#comments</comments>
		<pubDate>Mon, 26 Dec 2005 17:26:08 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[Parser]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[XML_Feed_Parser]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/12/xml_feed_parser-028/</guid>
		<description><![CDATA[Paying projects have kept me away from XML_Feed_Parser for the past couple of months, but today finally brought time to get a new release into shape.
The main focus has been on working through the tests that come with The Universal Feed Parser. I have a (rudimentary) script that converts those tests into PHP and makes <a href="http://jystewart.net/process/2005/12/xml_feed_parser-028/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Paying projects have kept me away from <a href="http://pear.php.net/package/XML_Feed_Parser">XML_Feed_Parser</a> for the past couple of months, but today finally brought time to get a new release into shape.</p>
<p>The main focus has been on working through the tests that come with <a href="http://www.feedparser.org">The Universal Feed Parser</a>. I have a (rudimentary) script that converts those tests into PHP and makes some syntax conversion to bring them into line with my package. There&#8217;s still some hand tweaking required to get the tests running properly, but for the time being that seems preferable to writing a full lexer.</p>
<p>With those tweaks in place, the package now passes the majority of the Atom 1.0 tests. Along the way I&#8217;ve added a few new compatibility features (guid now maps to id in atom, in some cases uses of url/href will automatically map to uri where that&#8217;s appropriate), and cleaned up the workings of the __call magic function that does a lot of the dispatching within and between the classes.</p>
<p>Another major addition is the decoding of base64 encoded atom:text constructs.</p>
<p>Hopefully development will pick up speed over the next few weeks. My aim is to have a beta out some time in January.</p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2005/12/xml_feed_parser-028/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Feed Parser version</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/</link>
		<comments>http://jystewart.net/process/2005/10/new-feed-parser-version/#comments</comments>
		<pubDate>Sat, 15 Oct 2005 15:10:13 +0000</pubDate>
		<dc:creator>James Stewart</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Parser]]></category>
		<category><![CDATA[PEAR]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[XML_Feed_Parser]]></category>

		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/</guid>
		<description><![CDATA[There&#8217;s a new version (0.2.5alpha) of XML_Feed_Parser in the wild.
I&#8217;ve cleaned up the handling of xml:base considerably, finally switching over to using PHP DOM&#8217;s baseURI attribute and checking the bases for all links returned, whether from link constructs or in text constructs with the type &#8216;xhtml&#8217;. That coincides with reworking the getText() and getContent() methods <a href="http://jystewart.net/process/2005/10/new-feed-parser-version/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a new version (0.2.5alpha) of <a href="http://pear.php.net/package/XML_Feed_Parser">XML_Feed_Parser</a> in the wild.</p>
<p>I&#8217;ve cleaned up the handling of xml:base considerably, finally switching over to using <a href="http://php.net/dom">PHP DOM</a>&#8217;s baseURI attribute and checking the bases for all links returned, whether from link constructs or in text constructs with the type &#8216;xhtml&#8217;. That coincides with reworking the getText() and getContent() methods for atom so they now properly recognise the different types that the atom spec allows. There&#8217;s a little more work to do to properly allow non text/html mime types in atom:content, since I don&#8217;t want to return less common mime types without a way for the user to check the type beforehand. That should come in the next version.</p>
<p>I&#8217;ve had one enquiry as to whether the package will work for those not using PEAR. It&#8217;s dependency on PEAR is limited to the PEAR_Exception class, so for those who genuinely need to use it without PEAR, you could declare an empty class called PEAR_Exception that extends Exception and everything else should work. For those wondering whether there&#8217;s any way to get the code working with PHP4, the answer is &#8216;no&#8217; since I make so much use of the PHP5 DOM implementation, plus simplexml and exceptions. For those looking for PHP4 support, check out <a href="http://magpierss.sourceforge.net/">Magpie</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jystewart.net/process/2005/10/new-feed-parser-version/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
