<?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>engineering &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/engineering/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>Custom Filters in Zend Framework</title>
		<link>/2010/04/12/custom-filter-in-zend-framework/</link>
		<comments>/2010/04/12/custom-filter-in-zend-framework/#respond</comments>
		<pubDate>Mon, 12 Apr 2010 16:09:34 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[Filtration]]></category>
		<category><![CDATA[Interface Inc.]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">/?p=1432</guid>
		<description><![CDATA[Although there might be tons of articles about this theme I&#8217;m going to describe it in breve. What I was supposed to do is to filter a string, which is supposed to be a date, but if only the year or year/month pair were present I should filter them correctly. So the first thing I &#8230; <a href="/2010/04/12/custom-filter-in-zend-framework/" class="more-link">Continue reading <span class="screen-reader-text">Custom Filters in Zend Framework</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/10/27/zend-framework-custom-urls/" rel="bookmark" title="Zend Framework custom URLs">Zend Framework custom URLs </a></li>
<li><a href="/2010/08/09/models-in-zend-framework-initialize-all-methods-with-init/" rel="bookmark" title="Models in Zend Framework &#8211; Initialize All Methods with init()">Models in Zend Framework &#8211; Initialize All Methods with init() </a></li>
<li><a href="/2010/06/21/redirect-with-zend-framework/" rel="bookmark" title="Redirect with Zend Framework">Redirect with Zend Framework </a></li>
<li><a href="/2010/07/21/setting-up-global-cache-in-zend-framework/" rel="bookmark" title="Setting Up Global Cache in Zend Framework">Setting Up Global Cache in Zend Framework </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Although there might be tons of articles about this theme I&#8217;m going to describe it in breve. What I was supposed to do is to filter a string, which is supposed to be a date, but if only the year or year/month pair were present I should filter them correctly.</p>
<p>So the first thing I tried to achieve is to write a custom Zend Filter. It seem to me a simple task and it is.</p>
<p>The only thing you should do is to define a class in Zend/Filter/ folder with the name of the filter of course. In my case this was Zend_Filter_Mydate, which really sounds very strange, but you can name it after whatever you want.</p>
<p>The only thing you need in that class is a public function filter by giving it one parameter, in most cases, and returning the filtered value.</p>
<p>Here&#8217;s a snippet:</p>
<pre lang="php" escaped="true">
&lt;?php

require_once 'Zend_Filter_Interface.php'

class Zend_Filter_Mydate extends Zend_Filter_Interface
{

    public function filter($value)
    {
        // do something with the source and return the filtered value
    }

}
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/10/27/zend-framework-custom-urls/" rel="bookmark" title="Zend Framework custom URLs">Zend Framework custom URLs </a></li>
<li><a href="/2010/08/09/models-in-zend-framework-initialize-all-methods-with-init/" rel="bookmark" title="Models in Zend Framework &#8211; Initialize All Methods with init()">Models in Zend Framework &#8211; Initialize All Methods with init() </a></li>
<li><a href="/2010/06/21/redirect-with-zend-framework/" rel="bookmark" title="Redirect with Zend Framework">Redirect with Zend Framework </a></li>
<li><a href="/2010/07/21/setting-up-global-cache-in-zend-framework/" rel="bookmark" title="Setting Up Global Cache in Zend Framework">Setting Up Global Cache in Zend Framework </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/04/12/custom-filter-in-zend-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
