<?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>Web Development and stuff... &#187; Inflector</title>
	<atom:link href="http://lenss.nl/tag/inflector/feed/" rel="self" type="application/rss+xml" />
	<link>http://lenss.nl</link>
	<description>Thijs Lensselink - Web Developer</description>
	<lastBuildDate>Mon, 06 Sep 2010 21:16:28 +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>Zend_Filter_Inflector and the CamelCaseToUnderscore filter</title>
		<link>http://lenss.nl/2008/08/zend_filter_inflector-and-the-camelcasetounderscore-filter/</link>
		<comments>http://lenss.nl/2008/08/zend_filter_inflector-and-the-camelcasetounderscore-filter/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 13:23:14 +0000</pubDate>
		<dc:creator>Thijs Lensselink</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Inflector]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://lenss.nl/blog/?p=119</guid>
		<description><![CDATA[I was thinking about how to add theme support to an application that makes use of the Zend_Layout component. When i came across the Zend_Filter_Inflector class. This looks interesting. From teh ZF manual: Zend_Filter_Inflector is a general purpose tool for rules-based inflection of strings to a given target. This little class makes it easy to [...]]]></description>
			<content:encoded><![CDATA[<p>I was thinking about how to add theme support to an application that makes use of the Zend_Layout component. When i came across the Zend_Filter_Inflector class. This looks interesting. From teh ZF manual:</p>
<blockquote><p>Zend_Filter_Inflector is a general purpose tool for rules-based inflection of strings to a given target.</p></blockquote>
<p>This little class makes it easy to convert string to for instance paths. Anyway. i was trying to configure this class in my Bootstrap class. And run into some problems. I was testing the example in the manual. which makes use of the Zend_Filter CalemCaseToUnderscore. But when i reloaded my page instead of the usual output i was treated by an error.</p>
<pre name="code" class="php">
$inflector = new Zend_Filter_Inflector(':script.:suffix');
$inflector->setRules(array(
    ':script' => array('CamelCaseToUnderscore'),
    'suffix' => 'html'
));
</pre>
<blockquote><p>Zend_Loader_PluginLoader_Exception: Plugin by name CamelCaseToUnderscore was not found in the registry. in Zend\Loader\PluginLoader.php on line 370</p></blockquote>
<p>When i looked at the structure of the Zend folder. I noticed the CamelCaseToUnderscore filter was not available in the root of the Filter directory. Instead it&#8217;s placed inside the Filter/Word directory. So i prefixed the class name with Word_. And this works fine. The code now looks like this.</p>
<pre name="code" class="php">
$inflector = new Zend_Filter_Inflector(':script.:suffix');
$inflector->setRules(array(
    ':script' => array('Word_CamelCaseToUnderscore'),
    'suffix' => 'html'
));
</pre>
<p>it&#8217;s a minor issue but i reported <a href="http://framework.zend.com/issues/browse/ZF-4011">it</a> anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenss.nl/2008/08/zend_filter_inflector-and-the-camelcasetounderscore-filter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
