<?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>ActiveCodeline &#187; Zend Framework</title>
	<atom:link href="http://activecodeline.com/tag/zendframework/feed" rel="self" type="application/rss+xml" />
	<link>http://activecodeline.com</link>
	<description>Blog site of Branko Ajzele, web application developer.</description>
	<lastBuildDate>Tue, 07 Sep 2010 05:59:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Drupal Zend Framework autoloader module, ActiveCodeline_ZendFrameworkLoader</title>
		<link>http://activecodeline.com/drupal-zend-framework-autoloader-module-activecodeline_zendframeworkloader</link>
		<comments>http://activecodeline.com/drupal-zend-framework-autoloader-module-activecodeline_zendframeworkloader#comments</comments>
		<pubDate>Mon, 22 Jun 2009 06:54:19 +0000</pubDate>
		<dc:creator>branko</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://activecodeline.com/?p=794</guid>
		<description><![CDATA[For all those poking around Drupal and Zend Framework, I wrote a little module that auto-loads Zend Framework. This module works with new Zend_Loader_Autoloader introduced in version 1.8. Therefore this Drupal module requires new 1.8 or higher version of Zend Framework library. Module is really simple, not much to it. Note that Zend Framework library [...]]]></description>
			<content:encoded><![CDATA[<p>For all those poking around Drupal and Zend Framework, I wrote a little module that auto-loads Zend Framework. This module works with new Zend_Loader_Autoloader introduced in version 1.8. Therefore this Drupal module requires new 1.8 or higher version of Zend Framework library. <span id="more-794"></span></p>
<p>Module is really simple, not much to it. Note that Zend Framework library it self is not packed with module, you need to download is separately and copy paste to modules /library folder.</p>
<p>It has only two files, one .info file needed for Drupal to recognize it and one .module file whose content you can see below.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> ZendFrameworkLoader_boot<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">//Get current file path, cut off the file name and use the rest as folder path</span>
	<span style="color: #000088;">$siteBasePath</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ZendFrameworkLoader.module'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//Append subfolder named 'library' to the path</span>
	<span style="color: #000088;">$siteLibraryPath</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$siteBasePath</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'library'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//Add script wide include paths</span>
	<span style="color: #990000;">set_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span>	<span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #000088;">$siteLibraryPath</span>
							<span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #000088;">$siteLibraryPath</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/Zend'</span>
							<span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #990000;">get_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">include_once</span> <span style="color: #000088;">$siteLibraryPath</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/Zend/Loader/Autoloader.php'</span><span style="color: #339933;">;</span>
	Zend_Loader_Autoloader<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see module is using hook_boot() to handle (inject) auto-loading code. Therefore try not to call any of the Zend library components in hook_boot functions, latter is good.</p>
<p>Installing a module is done by simply copy-pasting unarchived module to /sites/all/modules/ folder. By doing so you should have /sites/all/modules/ActiveCodeline folder in place if you copy-pasted it ok.</p>
<p>Download <a href='http://activecodeline.com/wp-content/uploads/2009/06/activecodeline_zendframeworkloader.zip'>ActiveCodeline_ZendFrameworkLoader</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://activecodeline.com/drupal-zend-framework-autoloader-module-activecodeline_zendframeworkloader/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Simple TODO application in Zend Framework and Doctrine ORM</title>
		<link>http://activecodeline.com/simple-todo-application-in-zend-framework-and-doctrine-orm</link>
		<comments>http://activecodeline.com/simple-todo-application-in-zend-framework-and-doctrine-orm#comments</comments>
		<pubDate>Sat, 02 May 2009 16:57:29 +0000</pubDate>
		<dc:creator>branko</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Doctrine ORM]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://activecodeline.com/?p=670</guid>
		<description><![CDATA[I wrote a little TODO application in Zend Framework (1.8) and Doctrine ORM (1.1). I&#8217;m posting it more as a sample (practice) app for Zend and Doctrine newcomers. Entire process of adding, deleting and editing TODO&#8217;s is AJAX based. I used jQuery and Jeditable plugin for it. jQuery and Jeditable plugins are provided in this [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a little TODO application in Zend Framework (1.8) and Doctrine ORM (1.1). I&#8217;m posting it more as a sample (practice) app for Zend and Doctrine newcomers. Entire process of adding, deleting and editing TODO&#8217;s is AJAX based. I used jQuery and Jeditable plugin for it. jQuery and Jeditable plugins are provided in this zip-ed archive. You should download Zend Framework and Doctrine ORM yourself, and place them in appropriate directory. Set the PHP include path to point to that directory.<span id="more-670"></span></p>
<p>Important thing to keep in mind. Few days ago, Zend Framework 1.8 came out. It uses different auto loading approach. I did not had time to study it in detail so some things in /public/index.php file might look out of order. The parts where I auto-loaded Doctrine and models directory. Don&#8217;t worry, it&#8217;s working either way <img src='http://activecodeline.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  What you SHOULD do is CHANGE THE INCLUDE PATH line 28 of the index.php file to reflect your machine path to library folder.</p>
<p>Here are some screenshot of my final application:</p>
<p><a href="http://activecodeline.com/wp-content/uploads/2009/05/toody_example_todo_app_screenshot.jpg"><img src="http://activecodeline.com/wp-content/uploads/2009/05/toody_example_todo_app_screenshot-300x183.jpg" alt="toody_example_todo_app_screenshot" title="toody_example_todo_app_screenshot" width="300" height="183" class="alignnone size-medium wp-image-671" /></a></p>
<p><a href="http://activecodeline.com/wp-content/uploads/2009/05/toody_inline_edit.png"><img src="http://activecodeline.com/wp-content/uploads/2009/05/toody_inline_edit-300x178.png" alt="toody_inline_edit" title="toody_inline_edit" width="300" height="178" class="alignnone size-medium wp-image-672" /></a></p>
<p><a href="http://activecodeline.com/wp-content/uploads/2009/05/toody_inline_edit2.png"><img src="http://activecodeline.com/wp-content/uploads/2009/05/toody_inline_edit2-300x186.png" alt="toody_inline_edit2" title="toody_inline_edit2" width="300" height="186" class="alignnone size-medium wp-image-673" /></a></p>
<p>Here is the screenshot of my library folder</p>
<p><a href="http://activecodeline.com/wp-content/uploads/2009/05/my_library_path.png"><img src="http://activecodeline.com/wp-content/uploads/2009/05/my_library_path-300x206.png" alt="my_library_path" title="my_library_path" width="300" height="206" class="alignnone size-medium wp-image-676" /></a></p>
<p><a href='http://activecodeline.com/wp-content/uploads/2009/05/toody_all.zip'>DOWNLOAD toody</a> (need to download Zend Framework and Doctrine ORM separatly).</p>
<p>Took me around 3 and a half hour to write the app, take the screenshots and write this post. Therefore, use it only in education purpose, cause there is much more to be done to use it for real.</p>
]]></content:encoded>
			<wfw:commentRss>http://activecodeline.com/simple-todo-application-in-zend-framework-and-doctrine-orm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP dependency injection</title>
		<link>http://activecodeline.com/php-dependency-injection</link>
		<comments>http://activecodeline.com/php-dependency-injection#comments</comments>
		<pubDate>Sat, 28 Mar 2009 11:57:10 +0000</pubDate>
		<dc:creator>branko</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://activecodeline.com/?p=576</guid>
		<description><![CDATA[As most of the readers of this site, you probably know that my main platforms for development are Magento, Zend Framework, WordPress and Drupal. Sometimes the best and most fun part of our job is playing with the language itself (PHP). Recently I came across this term &#8220;dependency injection&#8221;. Hmmm, I wondered what it is. [...]]]></description>
			<content:encoded><![CDATA[<p>As most of the readers of this site, you probably know that my main platforms for development are Magento, Zend Framework, WordPress and Drupal. Sometimes the best and most fun part of our job is playing with the language itself (PHP). Recently I came across this term &#8220;dependency injection&#8221;. Hmmm, I wondered what it is. To be honest, not until few days ago have I ever heard about it. After some Google-ing I found very informative <a href="http://fabien.potencier.org/article/11/what-is-dependency-injection">article</a> by <a href="http://fabien.potencier.org/article/11/what-is-dependency-injection">Fabien Potencier</a>.</p>
<p>Reading the article made me realise how fancy everyday stuff can be called, &#8220;dependency injection&#8221;. This is something that is widely used in Magento, if I got it right. Anyhow, it helps knowing the right term <img src='http://activecodeline.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For all those who are unfamiliar with the term, I recommend reading the article. Cheers&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://activecodeline.com/php-dependency-injection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Core (LAMP/WAMP stack) overview</title>
		<link>http://activecodeline.com/zend-core-lampwamp-stack-overview</link>
		<comments>http://activecodeline.com/zend-core-lampwamp-stack-overview#comments</comments>
		<pubDate>Sat, 14 Mar 2009 18:30:25 +0000</pubDate>
		<dc:creator>branko</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://activecodeline.com/?p=515</guid>
		<description><![CDATA[For those interested in Zend Core (LAMP/WAMP stack), I wrote (screen-shotted) a little Zend Core overview at Inchoo.net (direct link).]]></description>
			<content:encoded><![CDATA[<p>For those interested in Zend Core (LAMP/WAMP stack), I wrote (screen-shotted) a little Zend Core overview at <a href="http://inchoo.net">Inchoo.net</a> (<a href="http://inchoo.net/zend/zend-core-php-lamp-wamp-stack-overview/">direct link</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://activecodeline.com/zend-core-lampwamp-stack-overview/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Auth database based identity persistence</title>
		<link>http://activecodeline.com/zend_auth-database-based-identity-persistence</link>
		<comments>http://activecodeline.com/zend_auth-database-based-identity-persistence#comments</comments>
		<pubDate>Tue, 10 Mar 2009 21:27:17 +0000</pubDate>
		<dc:creator>branko</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://activecodeline.com/?p=510</guid>
		<description><![CDATA[Wrote a new article on Inchoo.net, you can read it here. Basically, I wrote a storage class for those of you who dislike using default Zend_Auth session storage. You can see the class code below. For any extra info, please visit the Inchoo.net article (direct link) or visit the ZF Snippets site (direct link). &#60;?php [...]]]></description>
			<content:encoded><![CDATA[<p>Wrote a new article on Inchoo.net, you can read it <a href="http://inchoo.net/zend/zend-authentication-component-zend_auth-database-storage-class/">here</a>. Basically, I wrote a storage class for those of you who dislike using default Zend_Auth session storage.</p>
<p>You can see the class code below. For any extra info, please visit the <a href="http://inchoo.net">Inchoo.net</a> article (<a href="http://inchoo.net/zend/zend-authentication-component-zend_auth-database-storage-class/">direct link</a>) or visit the <a href="http://zfsnippets.com">ZF Snippets site</a> (<a href="http://zfsnippets.com/snippets/view/id/36">direct link</a>).</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> AuthDbStorage implements Zend_Auth_Storage_Interface
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_session</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'session'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_requiredFieldUserId</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'uid'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_requiredFieldSessionId</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'sid'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_requiredFieldHostname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'hostname'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_requiredFieldAccessed</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'accessed'</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">// Extra field to store some info (use serialize)</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_requiredFieldExtra</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'extra'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
	<span style="color: #666666; font-style: italic;">// Zend_Auth Adapter fields</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_authAdapterIdentityColumn</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_authAdapterTableName</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_timeToExpire</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">600</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_cookieName</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$_db</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span>Zend_Db_Adapter_Abstract <span style="color: #000088;">$adapter</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cookieName</span><span style="color: #339933;">,</span> <span style="color: #000088;">$authAdapterTableName</span><span style="color: #339933;">,</span> <span style="color: #000088;">$authAdapterIdentityColumn</span><span style="color: #339933;">,</span> <span style="color: #000088;">$timeToExpire</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</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>_db <span style="color: #339933;">=</span> <span style="color: #000088;">$adapter</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_cookieName</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cookieName</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_authAdapterTableName</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$authAdapterTableName</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_authAdapterIdentityColumn</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$authAdapterIdentityColumn</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_timeToExpire</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$timeToExpire</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Returns true if and only if storage is empty
     *
     * @throws Zend_Auth_Storage_Exception If it is impossible to determine whether storage is empty
     * @return boolean
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> isEmpty<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_db<span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchRow</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SELECT * FROM '</span><span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_session</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' WHERE '</span><span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldSessionId</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' = ?'</span><span style="color: #339933;">,</span>  <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_cookieName</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<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;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
    	<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Returns the contents of storage
     *
     * Behavior is undefined when storage is empty.
     *
     * @throws Zend_Auth_Storage_Exception If reading contents from storage is impossible
     * @return mixed
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> read<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>    	
    	<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_db<span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchRow</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SELECT * FROM '</span><span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_session</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' WHERE '</span><span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldSessionId</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' = ?'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_cookieName</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldAccessed</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_timeToExpire</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;">clear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #666666; font-style: italic;">//if (is_null($result)) { throw new Zend_Auth_Storage_Exception(); }</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$result</span><span style="color: #339933;">;</span>    	
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Writes $contents to storage
     *
     * @param  mixed $contents
     * @throws Zend_Auth_Storage_Exception If writing $contents to storage is impossible
     * @return void
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> write<span style="color: #009900;">&#40;</span><span style="color: #000088;">$contents</span><span style="color: #339933;">,</span> <span style="color: #000088;">$extraContents</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</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;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$contents</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    	<span style="color: #009900;">&#123;</span>
    		<span style="color: #000088;">$userId</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$contents</span><span style="color: #009900;">&#91;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldUserId</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>	
    	<span style="color: #009900;">&#125;</span>
&nbsp;
    	<span style="color: #b1b100;">else</span> 
    	<span style="color: #009900;">&#123;</span>
    		<span style="color: #000088;">$userId</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_db<span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchOne</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SELECT * FROM '</span><span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_authAdapterTableName</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' WHERE '</span><span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_authAdapterIdentityColumn</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' = ?'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$contents</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
    	<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000088;">$fields</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldUserId</span> 	<span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$userId</span><span style="color: #339933;">,</span>
			<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldSessionId</span> 	<span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_cookieName</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
			<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldHostname</span> 	<span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
			<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldAccessed</span> 	<span style="color: #339933;">=&gt;</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$extraContents</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$fields</span><span style="color: #009900;">&#91;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldExtra</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$extraContents</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Before write, delete all session info</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Check to see if session has expired</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Now write new one</span>
		<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_db<span style="color: #339933;">-&gt;</span><span style="color: #004000;">insert</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_session</span><span style="color: #339933;">,</span> <span style="color: #000088;">$fields</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> throw <span style="color: #000000; font-weight: bold;">new</span> Zend_Auth_Storage_Exception<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Clears contents from storage
     *
     * @throws Zend_Auth_Storage_Exception If clearing contents from storage is impossible
     * @return void
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> clear<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>	
		try 
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_db<span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DELETE FROM '</span><span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_session</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' WHERE '</span><span style="color: #339933;">.</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_requiredFieldSessionId</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' = ?'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_cookieName</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$ex</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			throw <span style="color: #000000; font-weight: bold;">new</span> Zend_Auth_Storage_Exception<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: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://activecodeline.com/zend_auth-database-based-identity-persistence/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend components in WordPress (or any other CMS)</title>
		<link>http://activecodeline.com/zend-components-in-wordpress-or-any-other-cms</link>
		<comments>http://activecodeline.com/zend-components-in-wordpress-or-any-other-cms#comments</comments>
		<pubDate>Fri, 27 Feb 2009 13:23:28 +0000</pubDate>
		<dc:creator>branko</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://activecodeline.com/?p=500</guid>
		<description><![CDATA[If you are involved in active web application development, then chances are you have heard about both WordPress and Zend Framework. Learning Zend Framework can be tedious and time consuming task (but it sure pays of, this goes for all other PHP frameworks out there). Anyhow, lot of our projects use WordPress. Not because we [...]]]></description>
			<content:encoded><![CDATA[<p>If you are involved in active web application development, then chances are you have heard about both WordPress and Zend Framework. Learning Zend Framework can be tedious and time consuming task (but it sure pays of, this goes for all other PHP frameworks out there). Anyhow, lot of our projects use WordPress. Not because we love it so much, but because our clients love it. Since we do ecommerce development, our prime tool when it comes to online stores is&#8230; MAGENTO. Magento, on the other hand comes with Zend Framework implemented. So, if you are working on a site that uses both Magento and WordPress then it seems logical to try and use Zend Framework components (classes) inside your WordPress templates (in case you are working on something more than just styling the WordPress).<span id="more-500"></span></p>
<p>In this article, I&#8217;ll show you how easy is to implement Zend Framework into WordPress and use its components across WordPress templates (or even plugins).</p>
<p>To use the Zend Framework components inside any of your WordPress templates we need to set autoloading of entire Zend Framework. This will help us avoid using unnecessary includes and/or requires. To set the autoloading you simply open index.php file from root of your WordPress installation and write down the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_USE_THEMES'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Include and auto-load Zend Framework into the WordPress CMS
 */</span>
<span style="color: #990000;">set_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span> <span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #0000ff;">'./library'</span> <span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #990000;">get_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'library/Zend/Loader.php'</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">registerAutoload</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/** Loads the WordPress Environment and Template */</span>
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./wp-blog-header.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Notice the <strong>/library</strong>? In my case, /library folder is located inside the root of WordPress installation. This is it. You can now call any of Zend Framework classes inside your WordPress template. Here is an example of <strong>single.php</strong> template file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
<span style="color: #000088;">$frontendOptions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
   <span style="color: #0000ff;">'lifetime'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">45</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// in seconds</span>
   <span style="color: #0000ff;">'automatic_serialization'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$backendOptions</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'cache_dir'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'/home/branko/Public/articles/cache/'</span> <span style="color: #666666; font-style: italic;">// Directory where to put the cache files</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// getting a Zend_Cache_Core object</span>
<span style="color: #000088;">$cache</span> <span style="color: #339933;">=</span> Zend_Cache<span style="color: #339933;">::</span><span style="color: #004000;">factory</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Core'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'File'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$frontendOptions</span><span style="color: #339933;">,</span> <span style="color: #000088;">$backendOptions</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>You must admit, this was really easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://activecodeline.com/zend-components-in-wordpress-or-any-other-cms/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Integrating Zend Framework with Drupal CMS</title>
		<link>http://activecodeline.com/integrating-zend-framework-with-drupal-cms</link>
		<comments>http://activecodeline.com/integrating-zend-framework-with-drupal-cms#comments</comments>
		<pubDate>Sat, 14 Feb 2009 17:24:37 +0000</pubDate>
		<dc:creator>branko</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://activecodeline.com/?p=462</guid>
		<description><![CDATA[Few days ago I started checking out Drupal CMS. I&#8217;ve already done some things in Drupal, around two, or three years ago so it&#8217;s kind of a new experience with me. After few months of Magento development, this seems like a walk trough park. My first &#8220;Hello world&#8221; module for Drupal yesterday was to get [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago I started checking out Drupal CMS. I&#8217;ve already done some things in Drupal, around two, or three years ago so it&#8217;s kind of a new experience with me. After few months of Magento development, this seems like a walk trough park. My first &#8220;Hello world&#8221; module for Drupal yesterday was to get some product info from Magento using Magento Core API, or shall I say XML-RPC calls to web service. </p>
<p>After half of day of unsuccessful poking around Drupal&#8217;s xmlrpc() function, trying to make a valid XML-RPC call wth HTTP Authentification, I finally gave up and decided to use Zend Framework. <span id="more-462"></span></p>
<p>However, in order to use any of the Zend Framework classes I needed to do two things: Set the include path to Zend library location and set the auto-load of classes so I don&#8217;t have to &#8220;include&#8221; or &#8220;require&#8221; Zend class files each time I wish to call a Zend Framework class. This is really easy to do. Here is how. </p>
<p>Open your index.php file from the root of your Drupal installation and copy paste the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * Include and auto-load Zend Framework into the Drupal CMS  
 */</span>
<span style="color: #990000;">set_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span> <span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #0000ff;">'./library'</span> <span style="color: #339933;">.</span> PATH_SEPARATOR <span style="color: #339933;">.</span> <span style="color: #990000;">get_include_path</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'library/Zend/Loader.php'</span><span style="color: #339933;">;</span>
Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">registerAutoload</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Note the &#8220;./library&#8221; part in include path and &#8220;require_once&#8221; statement. This &#8220;library&#8221; is the folder in which you copy-paste your &#8220;/Zend&#8221; library folder of Zend Framework.</p>
<p>With Zend Framework you can make XML-RPC call like</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$webserviceUrl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://myshop.com/index.php/api/xmlrpc/&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$webserviceUsername</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;my-user-name&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$webservicePassword</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;some-pass&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_XmlRpc_Client<span style="color: #009900;">&#40;</span><span style="color: #000088;">$webserviceUrl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$session</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">call</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$webserviceUsername</span><span style="color: #339933;">,</span> <span style="color: #000088;">$webservicePassword</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$filters</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'product_id'</span> 	<span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;in&quot;</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">160</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">161</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">166</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
<span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">call</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'call'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$session</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'catalog_product.list'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$filters</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>You can call above XML-RPC code from your module andit should work fine.<br />
Hope some of you find this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://activecodeline.com/integrating-zend-framework-with-drupal-cms/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Understanding Magento directory structure</title>
		<link>http://activecodeline.com/understanding-magento-directory-structure</link>
		<comments>http://activecodeline.com/understanding-magento-directory-structure#comments</comments>
		<pubDate>Fri, 24 Oct 2008 10:24:37 +0000</pubDate>
		<dc:creator>branko</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://activecodeline.com/?p=300</guid>
		<description><![CDATA[As I already mentioned in my previous post, I&#8217;ve stated learning Zend Framework. Lack of experience with it has causing quite a headaches for me concerning Magento. One thing I like about Zend is documentation. It&#8217;s awesome. Anyhow, here&#8217;s a little something form Zend Manual which might help you better understand Magento directory structure, Using [...]]]></description>
			<content:encoded><![CDATA[<p>As I already mentioned in my previous post, I&#8217;ve stated learning Zend Framework. Lack of experience with it has causing quite a headaches for me concerning Magento. One thing I like about Zend is documentation. It&#8217;s awesome.</p>
<p>Anyhow, here&#8217;s a little something form Zend Manual which might help you better understand Magento directory structure, <a href="http://framework.zend.com/manual/en/zend.controller.modular.html">Using a Conventional Modular Directory Structure</a>.</p>
<p>If you open Magento&#8217;s <strong>/lib/Zend/Controller/Dispatcher/Standard.php</strong> and look closely at it you will see some of the methods mentioned in the above manual.</p>
]]></content:encoded>
			<wfw:commentRss>http://activecodeline.com/understanding-magento-directory-structure/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
