<?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>zend_loader_autoloader &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/zend_loader_autoloader/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Switch from Zend_Loader to Zend_Loader_Autoloader</title>
		<link>/2009/05/10/switch-from-zend_loader-to-zend_loader_autoloader/</link>
		<comments>/2009/05/10/switch-from-zend_loader-to-zend_loader_autoloader/#comments</comments>
		<pubDate>Sun, 10 May 2009 04:24:44 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[zend framework]]></category>
		<category><![CDATA[zend_loader]]></category>
		<category><![CDATA[zend_loader_autoloader]]></category>

		<guid isPermaLink="false">/?p=552</guid>
		<description><![CDATA[Zend_Loader Zend_Loader was the usual kind of autoloading in Zend Framework before version 1.8. Than simply you say: require_once &#8220;Zend/Loader.php&#8221;; Zend_Loader::registerAutoload(); That made all your application to autoload files from the library folder where usualy the Zend Framework stays. That has several things to be changed. The namespaces There where not really namespaces for autoloading. &#8230; <a href="/2009/05/10/switch-from-zend_loader-to-zend_loader_autoloader/" class="more-link">Continue reading <span class="screen-reader-text">Switch from Zend_Loader to Zend_Loader_Autoloader</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2008/08/11/zend-framework-quick-tutorial-part-2-directory-layout-and-bootstrapping/" rel="bookmark" title="Zend Framework &#8211; quick tutorial (part 2)">Zend Framework &#8211; quick tutorial (part 2) </a></li>
<li><a href="/2009/03/31/lambda-functions-in-php/" rel="bookmark" title="Lambda functions in PHP?">Lambda functions in PHP? </a></li>
<li><a href="/2010/04/16/zend_validate_alnum-doesnt-work-correctly/" rel="bookmark" title="Zend_Validate_Alnum Doesn&#8217;t Work Correctly">Zend_Validate_Alnum Doesn&#8217;t Work Correctly </a></li>
<li><a href="/2010/04/20/custom-routes-with-zend_controller_router_route/" rel="bookmark" title="Custom Routes with Zend_Controller_Router_Route">Custom Routes with Zend_Controller_Router_Route </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Zend_Loader</h2>
<p>Zend_Loader was the usual kind of autoloading in Zend Framework before version 1.8. Than simply you say:</p>
<blockquote><p>require_once &#8220;Zend/Loader.php&#8221;;<br />
Zend_Loader::registerAutoload();</p></blockquote>
<p>That made all your application to autoload files from the library folder where usualy the Zend Framework stays. That has several things to be changed.<span id="more-552"></span></p>
<h2>The namespaces</h2>
<p>There where not really namespaces for autoloading. Everything was searched to be loaded in one single namespace. And thus there where not the functionality to remove a namespace from the game. You have everything all the time.</p>
<h2>Zend_Loader_Autoloader</h2>
<p>This is new from version 1.8 in Zend Framework. Now you should use this class to autoload your classes. There&#8217;s really namespaces and for more info and detailed information you should search the documentation of the ZF.</p>
<h2>The most simple way to switch from Zend_Loader to Zend_Loader_Autoloader</h2>
<p>That&#8217;s really simple, and I don&#8217;t understand why there&#8217;s not proper explanation how to do that in the ZF docs. You need to replaces this lines of code:</p>
<blockquote><p>require_once &#8220;Zend/Loader.php&#8221;;<br />
Zend_Loader::registerAutoload();</p></blockquote>
<p>with these:</p>
<blockquote><p>require_once &#8216;Zend/Loader/Autoloader.php&#8217;;<br />
$autoloader = Zend_Loader_Autoloader::getInstance();<br />
$autoloader-&gt;setFallbackAutoloader(true);</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2008/08/11/zend-framework-quick-tutorial-part-2-directory-layout-and-bootstrapping/" rel="bookmark" title="Zend Framework &#8211; quick tutorial (part 2)">Zend Framework &#8211; quick tutorial (part 2) </a></li>
<li><a href="/2009/03/31/lambda-functions-in-php/" rel="bookmark" title="Lambda functions in PHP?">Lambda functions in PHP? </a></li>
<li><a href="/2010/04/16/zend_validate_alnum-doesnt-work-correctly/" rel="bookmark" title="Zend_Validate_Alnum Doesn&#8217;t Work Correctly">Zend_Validate_Alnum Doesn&#8217;t Work Correctly </a></li>
<li><a href="/2010/04/20/custom-routes-with-zend_controller_router_route/" rel="bookmark" title="Custom Routes with Zend_Controller_Router_Route">Custom Routes with Zend_Controller_Router_Route </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/05/10/switch-from-zend_loader-to-zend_loader_autoloader/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>
