<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - jiewmeng</title>
<link>http://snipplr.com/users/jiewmeng/language/php</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 19 May 2013 23:09:24 GMT</pubDate>
<item>
<title>(PHP) Zend Framework: Bootstrapping Zend_Log (log to firebug)</title>
<link>http://snipplr.com/view/39081/zend-framework-bootstrapping-zendlog-log-to-firebug/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 15 Aug 2010 00:06:30 GMT</pubDate>
<guid>http://snipplr.com/view/39081/zend-framework-bootstrapping-zendlog-log-to-firebug/</guid>
</item>
<item>
<title>(PHP) Zend Framework: Get bootstrap resource from anywhere in application</title>
<link>http://snipplr.com/view/38967/zend-framework-get-bootstrap-resource-from-anywhere-in-application/</link>
<description><![CDATA[ <p>referenced: [stack overflow](http://stackoverflow.com/questions/3325481/zend-framework-get-bootstrap-resource-from-anywhere-in-application/3328384#3328384)</p> ]]></description>
<pubDate>Thu, 12 Aug 2010 13:54:23 GMT</pubDate>
<guid>http://snipplr.com/view/38967/zend-framework-get-bootstrap-resource-from-anywhere-in-application/</guid>
</item>
<item>
<title>(PHP) Integrating Zend Framework 1.10 with Doctrine 2 (using Doctrine's Autoloader)</title>
<link>http://snipplr.com/view/38628/integrating-zend-framework-110-with-doctrine-2-using-doctrines-autoloader/</link>
<description><![CDATA[ <p>an alternative to a previous method i did using Zend Framework's autoloaders only. this method uses Doctrine's autoloaders for doctrine's classes and Zend's for Zend's :) 

i think the difficulty i had was autoloading from a specific directory (with just Zend's autoloaders). eg. in Doctrine autoloaders i will do

    new Doctrine\Common\ClassLoader(
	    'Application\Models', 
		APPLICATION_PATH . '/models'
	);
	
where the 2nd param is the path to find the classes. basically, 

- we create a resource method in `bootstrap.php`. 
- in it, we setup doctrine in a similar way to how the doctrine sandbox sets it up. to setup autoloading of doctrine's classes, as we create new doctrine class loaders, we push them into the zend's autoloader.
- then its basically the same as the sandbox app, setting up caches, metadata drivers, proxies etc.</p> ]]></description>
<pubDate>Fri, 06 Aug 2010 21:14:20 GMT</pubDate>
<guid>http://snipplr.com/view/38628/integrating-zend-framework-110-with-doctrine-2-using-doctrines-autoloader/</guid>
</item>
<item>
<title>(PHP) Zend Framework: After logout, redirect the user to the page he came from</title>
<link>http://snipplr.com/view/37948/zend-framework-after-logout-redirect-the-user-to-the-page-he-came-from/</link>
<description><![CDATA[ <p>on 2nd thought, if a user logged out from a page only for logged in user, he will see a message stating he needs to login or similar, not ideal ... 

technical implementation: 

- use a view helper
- register the helper in bootstrap
- use view helper in view scripts</p> ]]></description>
<pubDate>Tue, 27 Jul 2010 21:02:53 GMT</pubDate>
<guid>http://snipplr.com/view/37948/zend-framework-after-logout-redirect-the-user-to-the-page-he-came-from/</guid>
</item>
<item>
<title>(PHP) Zend Framework: Having forms redirect back to page user came from</title>
<link>http://snipplr.com/view/37945/zend-framework-having-forms-redirect-back-to-page-user-came-from/</link>
<description><![CDATA[ <p>redirecting back to where the user came from is a very common functionality in login forms. 

technical implementation: 

- have a hidden field (`returnUrl`)
- populated by current url (in Zend Framework, i get this using the request's `getRequestUri()` function)
- in the `AuthController`, if the `returnUrl` field is set, i will redirect the user to that page using the `Redirector` helper.</p> ]]></description>
<pubDate>Tue, 27 Jul 2010 20:53:58 GMT</pubDate>
<guid>http://snipplr.com/view/37945/zend-framework-having-forms-redirect-back-to-page-user-came-from/</guid>
</item>
<item>
<title>(PHP) Integrating Zend Framework 1.10 with Doctrine 2</title>
<link>http://snipplr.com/view/37944/integrating-zend-framework-110-with-doctrine-2/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 27 Jul 2010 20:42:58 GMT</pubDate>
<guid>http://snipplr.com/view/37944/integrating-zend-framework-110-with-doctrine-2/</guid>
</item>
<item>
<title>(PHP) Zend Form: Customized to include honeyot anti-bot measure and other functionality</title>
<link>http://snipplr.com/view/37943/zend-form-customized-to-include-honeyot-antibot-measure-and-other-functionality/</link>
<description><![CDATA[ <p>in this custom `Zend_Form`, i added the following customizations\r\n\r\n -  customized default decorators\r\n -  added functions to set values of inputs (mainly for request params)\\r\\n- added honey pot anti-bot measure (see `__construct()`)\r\n - messenging functionality - simply rendering out `div`s with a css class and the message inside\r\n\r\ncode includes \r\n - the custom form abstract class\r\n - honey pot validator\r\n - FormMessages decorator</p> ]]></description>
<pubDate>Tue, 27 Jul 2010 20:36:07 GMT</pubDate>
<guid>http://snipplr.com/view/37943/zend-form-customized-to-include-honeyot-antibot-measure-and-other-functionality/</guid>
</item>
<item>
<title>(PHP) Custom Zend_Form: Changed Decorators &amp;amp; added methods</title>
<link>http://snipplr.com/view/37906/custom-zendform-changed-decorators--added-methods/</link>
<description><![CDATA[ <p>2 main objectives:

- change default decorators of element and form
- `setValues()` mainly used for persisting form entry from request params across requests</p> ]]></description>
<pubDate>Mon, 26 Jul 2010 19:23:43 GMT</pubDate>
<guid>http://snipplr.com/view/37906/custom-zendform-changed-decorators--added-methods/</guid>
</item>
<item>
<title>(PHP) Zend Framework: Zend View Action Helpers</title>
<link>http://snipplr.com/view/37817/zend-framework-zend-view-action-helpers/</link>
<description><![CDATA[ <p>Zend View Action Helpers allows you to include output from another controller action into the current output.</p> ]]></description>
<pubDate>Fri, 23 Jul 2010 21:26:50 GMT</pubDate>
<guid>http://snipplr.com/view/37817/zend-framework-zend-view-action-helpers/</guid>
</item>
<item>
<title>(PHP) Zend Framework: Partials</title>
<link>http://snipplr.com/view/37815/zend-framework-partials/</link>
<description><![CDATA[ <p>`article.phtml` looked up in `views/scripts` by default. \r\n\r\ncan use `$this->partial(\"blog/article.phtml\", array(...))` to look for it in the `views/scripts/blog` folder too</p> ]]></description>
<pubDate>Fri, 23 Jul 2010 21:18:01 GMT</pubDate>
<guid>http://snipplr.com/view/37815/zend-framework-partials/</guid>
</item>
<item>
<title>(PHP) Zend Framework: Setup Zend Navigation</title>
<link>http://snipplr.com/view/37814/zend-framework-setup-zend-navigation/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 23 Jul 2010 20:11:32 GMT</pubDate>
<guid>http://snipplr.com/view/37814/zend-framework-setup-zend-navigation/</guid>
</item>
<item>
<title>(PHP) Zend Framework: Disable Layout</title>
<link>http://snipplr.com/view/37813/zend-framework-disable-layout/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 23 Jul 2010 20:07:24 GMT</pubDate>
<guid>http://snipplr.com/view/37813/zend-framework-disable-layout/</guid>
</item>
</channel>
</rss>