<?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>Working Beta &#187; __autoload</title>
	<atom:link href="http://seeds.workingbeta.com/tag/__autoload/feed/" rel="self" type="application/rss+xml" />
	<link>http://seeds.workingbeta.com</link>
	<description>a bounch of nearly working code</description>
	<lastBuildDate>Wed, 10 Feb 2010 21:25:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>__autoload</title>
		<link>http://seeds.workingbeta.com/2008/11/13/__autoload/</link>
		<comments>http://seeds.workingbeta.com/2008/11/13/__autoload/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 12:19:28 +0000</pubDate>
		<dc:creator>gc</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[__autoload]]></category>

		<guid isPermaLink="false">http://seeds.workingbeta.com/?p=10</guid>
		<description><![CDATA[don&#8217;t know if you already use this
function __autoload($class){
&#160;&#160;&#160;&#160;# autoloading of a class #
&#160;&#160;&#160;&#160;if (file_exists("classes/class.".$class.".php"))
&#160;&#160;&#160;&#160;include_once("classes/class.".$class.".php");
&#160;&#160;&#160;&#160;else print "Failed to auto-load classes/class.{$class}.php";
&#160;&#160;&#160;&#160;}

it&#8217;s a little snippet of PHP code who take care of autoloading a class when you try to use it and the relevant definition file hasn&#8217;t still been loaded.
As you can see, if you use a bit [...]]]></description>
			<content:encoded><![CDATA[<p>don&#8217;t know if you already use this</p>
<blockquote><p><code><br />function __autoload($class){<br />
&nbsp;&nbsp;&nbsp;&nbsp;# autoloading of a class #<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (file_exists("classes/class.".$class.".php"))<br />
&nbsp;&nbsp;&nbsp;&nbsp;include_once("classes/class.".$class.".php");<br />
&nbsp;&nbsp;&nbsp;&nbsp;else print "Failed to auto-load classes/class.{$class}.php";<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
</code></p></blockquote>
<p>it&#8217;s a little snippet of PHP code who take care of autoloading a class when you try to use it and the relevant definition file hasn&#8217;t still been loaded.<br />
As you can see, if you use a bit of naming convention and a solid file structure it could resolve many problems, expecially the neverending list of file inclusions at the beginning of your scripts.</p>
<p>Maybe some tweaks should be necessary to solve securiti issues, if you have any&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://seeds.workingbeta.com/2008/11/13/__autoload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
