<?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>{Dev Tricks} &#187; PHP</title>
	<atom:link href="http://dev-tricks.net/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://dev-tricks.net</link>
	<description>Blogging developper tips and tricks</description>
	<lastBuildDate>Sun, 11 Dec 2011 11:54:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Lazy Loading in php with spl_autload</title>
		<link>http://dev-tricks.net/lazy-loading-in-php-with-spl_autload</link>
		<comments>http://dev-tricks.net/lazy-loading-in-php-with-spl_autload#comments</comments>
		<pubDate>Sun, 16 Nov 2008 18:40:44 +0000</pubDate>
		<dc:creator>Julien Palard</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://dev-tricks.net/?p=51</guid>
		<description><![CDATA[Today, a very short post about the lazy loading in PHP : spl_autoload I&#8217;ll not expose everything about it here, cause it&#8217;s already done here : http://php.net/autoload Basically, a Lazy Loading allow you to predifine some paths where PHP should &#8230; <a href="http://dev-tricks.net/lazy-loading-in-php-with-spl_autload">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today, a very short post about the lazy loading in PHP : spl_autoload<br />
I&#8217;ll not expose everything about it here, cause it&#8217;s already done here :<br />
<a href="http://php.net/autoload">http://php.net/autoload</a></p>
<p>Basically, a Lazy Loading allow you to predifine some paths where PHP should seek for classes to include, this allow you to directly instantiate an object without having included its file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> lazyLoad<span style="color: #009900;">&#40;</span><span style="color: #000088;">$strClassName</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">/* some work to find the file to include mixing strClassName */</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* include your files here... */</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">spl_autoload_register</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;lazyLoad&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://dev-tricks.net/lazy-loading-in-php-with-spl_autload/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

