<?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>XML &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/xml/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>PHP: Does SimpleXMLElement have toString() method? No, better use asXML()!</title>
		<link>/2011/10/10/php-does-simplexmlelement-have-tostring-method-no-better-use-asxml/</link>
		<comments>/2011/10/10/php-does-simplexmlelement-have-tostring-method-no-better-use-asxml/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 11:52:49 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[Computer file formats]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Markup languages]]></category>
		<category><![CDATA[Open formats]]></category>
		<category><![CDATA[OSI protocols]]></category>
		<category><![CDATA[Technical communication]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">/?p=2362</guid>
		<description><![CDATA[SimpleXML is a PHP extension that &#8220;provides a very simple and easily usable toolset to convert XML to an object&#8221; [1]. Thus you can pass a link to an XML file and SimpleXML will return an object. $xml = simplexml_load_file('path_to_the_file'); Sometimes you&#8217;d need to dump or save the entire XML as a string, but there’s &#8230; <a href="/2011/10/10/php-does-simplexmlelement-have-tostring-method-no-better-use-asxml/" class="more-link">Continue reading <span class="screen-reader-text">PHP: Does SimpleXMLElement have toString() method? No, better use asXML()!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2011/07/29/php-strings-how-to-get-the-extension-of-a-file/" rel="bookmark" title="PHP Strings: How to Get the Extension of a File">PHP Strings: How to Get the Extension of a File </a></li>
<li><a href="/2010/04/20/how-to-sanitize-user-input-in-php/" rel="bookmark" title="How to Sanitize User Input in PHP?">How to Sanitize User Input in PHP? </a></li>
<li><a href="/2010/07/14/media-rss-and-zf-part-2/" rel="bookmark" title="Media RSS and ZF &#8211; Part 2">Media RSS and ZF &#8211; Part 2 </a></li>
<li><a href="/2011/10/20/some-notes-on-the-object-oriented-model-of-php/" rel="bookmark" title="Some Notes on the Object-oriented Model of PHP">Some Notes on the Object-oriented Model of PHP </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>SimpleXML is a PHP extension that &#8220;provides a very simple and easily usable toolset to convert XML to an object&#8221; [1]. Thus you can pass a link to an XML file and SimpleXML will return an object.</p>
<pre lang="php">$xml = simplexml_load_file('path_to_the_file');</pre>
<p>Sometimes you&#8217;d need to dump or save the entire XML as a string, but there’s no toString method! As you can see $xml is an instance of the SimpleXMLElement class.</p>
<pre lang="php">var_dump($xml); // object(SimpleXMLElement)...</pre>
<p>Actually if you take a closer look:</p>
<pre lang="php">$xml->toString();</pre>
<p>will return <strong>&#8220;Call to an undefined method toString()&#8221;</strong>, which is frustrating because the developers community is used to use toString() when converting an object into a string.</p>
<figure id="attachment_2395" style="width: 448px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2011/10/XML.jpg"><img src="/wp-content/uploads/2011/10/XML.jpg" alt="XML" title="XML" width="448" height="269" class="size-full wp-image-2395" srcset="/wp-content/uploads/2011/10/XML.jpg 448w, /wp-content/uploads/2011/10/XML-300x180.jpg 300w" sizes="(max-width: 448px) 100vw, 448px" /></a><figcaption class="wp-caption-text">PHP&#039;s SimpleXML doesn&#039;t have toString() method. asXML() is used instead!</figcaption></figure>
<h2>The solution</h2>
<p>In fact there’s a method doing exactly what’s needed. This is <a title="SimpleXMLElement::asXML()" href="http://www.php.net/manual/en/simplexmlelement.asxml.php" target="_blank">SimpleXMLElement::asXML</a></p>
<p>As described in the manual page: &#8220;SimpleXMLElement::asXML — Return a well-formed XML string based on SimpleXML element&#8221; [2].</p>
<p>Besides that it does exactly what&#8217;s needed it sounds irrelevant, because you&#8217;ve an XML object and the name &#8220;asXML&#8221; doesn&#8217;t describe correctly what&#8217;s expected.</p>
<pre lang="php">$xml->asXML() // ?!</pre>
<ol>
<li><a title="SimpleXMLElement::asXML" href="http://www.php.net/manual/en/intro.simplexml.php" target="_blank">SimpleXMLElement::asXML</a></li>
<li><a title="SimpleXML Introduction" href="http://www.php.net/manual/en/intro.simplexml.php" target="_blank">SimpleXML Introduction</a></li>
</ol>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2011/07/29/php-strings-how-to-get-the-extension-of-a-file/" rel="bookmark" title="PHP Strings: How to Get the Extension of a File">PHP Strings: How to Get the Extension of a File </a></li>
<li><a href="/2010/04/20/how-to-sanitize-user-input-in-php/" rel="bookmark" title="How to Sanitize User Input in PHP?">How to Sanitize User Input in PHP? </a></li>
<li><a href="/2010/07/14/media-rss-and-zf-part-2/" rel="bookmark" title="Media RSS and ZF &#8211; Part 2">Media RSS and ZF &#8211; Part 2 </a></li>
<li><a href="/2011/10/20/some-notes-on-the-object-oriented-model-of-php/" rel="bookmark" title="Some Notes on the Object-oriented Model of PHP">Some Notes on the Object-oriented Model of PHP </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2011/10/10/php-does-simplexmlelement-have-tostring-method-no-better-use-asxml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Media RSS and ZF &#8211; Part 2</title>
		<link>/2010/07/14/media-rss-and-zf-part-2/</link>
		<comments>/2010/07/14/media-rss-and-zf-part-2/#respond</comments>
		<pubDate>Wed, 14 Jul 2010 19:05:15 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Computer file formats]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Software architecture]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Software framework]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">/?p=1803</guid>
		<description><![CDATA[Here&#8217;s the promised chunk of code making the most simple bridge between Zend Framework and Media RSS. Step 1 Just add a simple action in a controller: class IndexController extends Zend_Controller_Action { public function indexAction() { $this->getResponse()->setHeader('Content-Type', 'application/xml'); $this->view->somevar = 'some value'; echo $this->view->render('index/index.xml'); $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); } } Step 2 After you&#8217;ve setup the xml &#8230; <a href="/2010/07/14/media-rss-and-zf-part-2/" class="more-link">Continue reading <span class="screen-reader-text">Media RSS and ZF &#8211; Part 2</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/07/13/zend-framework-and-media-rss/" rel="bookmark" title="Zend Framework and Media RSS">Zend Framework and Media RSS </a></li>
<li><a href="/2010/06/23/bind-zend-action-with-non-default-view-part-2/" rel="bookmark" title="Bind Zend Action with Non-Default View &#8211; Part 2">Bind Zend Action with Non-Default View &#8211; Part 2 </a></li>
<li><a href="/2010/05/25/download-files-with-zend-framework/" rel="bookmark" title="Download Files with Zend Framework">Download Files with Zend Framework </a></li>
<li><a href="/2010/08/06/setting-up-zend-framework-with-modules/" rel="bookmark" title="Setting Up Zend Framework with Modules">Setting Up Zend Framework with Modules </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s the promised chunk of code making the most simple bridge between Zend Framework and Media RSS.</p>
<h2>Step 1</h2>
<p>Just add a simple action in a controller:</p>
<pre lang="php">
class IndexController extends Zend_Controller_Action
{
	public function indexAction()
	{
	    $this->getResponse()->setHeader('Content-Type', 'application/xml');
	    $this->view->somevar = 'some value';
	
	    echo $this->view->render('index/index.xml');
	
	    $this->_helper->layout()->disableLayout();
	    $this->_helper->viewRenderer->setNoRender(true);
	}
}
</pre>
<h2>Step 2</h2>
<p>After you&#8217;ve setup the xml file as a view script &#8211; you can simply access it as a normal Zend Framework view:</p>
<pre lang="xml">
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:av="http://www.searchvideo.com/schemas/av/1.0">
  <channel>
   <title><?php echo $this->somevar ?></title>
   ...
   other media rss elements
   ...
</channel>
</rss>
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/07/13/zend-framework-and-media-rss/" rel="bookmark" title="Zend Framework and Media RSS">Zend Framework and Media RSS </a></li>
<li><a href="/2010/06/23/bind-zend-action-with-non-default-view-part-2/" rel="bookmark" title="Bind Zend Action with Non-Default View &#8211; Part 2">Bind Zend Action with Non-Default View &#8211; Part 2 </a></li>
<li><a href="/2010/05/25/download-files-with-zend-framework/" rel="bookmark" title="Download Files with Zend Framework">Download Files with Zend Framework </a></li>
<li><a href="/2010/08/06/setting-up-zend-framework-with-modules/" rel="bookmark" title="Setting Up Zend Framework with Modules">Setting Up Zend Framework with Modules </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/07/14/media-rss-and-zf-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework and Media RSS</title>
		<link>/2010/07/13/zend-framework-and-media-rss/</link>
		<comments>/2010/07/13/zend-framework-and-media-rss/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 19:23:32 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Computer file formats]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Content syndication markup language]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[possible solutions]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[Zend Technologies]]></category>

		<guid isPermaLink="false">/?p=1795</guid>
		<description><![CDATA[The Problem Since native RSS format is not designed to deliver media content, there is a need for newer format supporting video and audio. There is such format &#8211; Media RSS introduced by Yahoo! in 2004. Actually now RSS supports some king of pseudo audio and video with the enclosure tag. Although there is a &#8230; <a href="/2010/07/13/zend-framework-and-media-rss/" class="more-link">Continue reading <span class="screen-reader-text">Zend Framework and Media RSS</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/07/14/media-rss-and-zf-part-2/" rel="bookmark" title="Media RSS and ZF &#8211; Part 2">Media RSS and ZF &#8211; Part 2 </a></li>
<li><a href="/2010/04/28/zend_datesetoptions-and-format_type-in-zend-framework-1-10-3/" rel="bookmark" title="Zend_Date::setOptions and format_type in Zend Framework 1.10.3">Zend_Date::setOptions and format_type in Zend Framework 1.10.3 </a></li>
<li><a href="/2010/04/30/burn-feeds-in-zend-framework/" rel="bookmark" title="Burn Feeds in Zend Framework">Burn Feeds in Zend Framework </a></li>
<li><a href="/2010/08/23/can-twitter-replace-the-rss-feed-readers/" rel="bookmark" title="Can Twitter Replace the RSS Feed Readers">Can Twitter Replace the RSS Feed Readers </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>The Problem</h2>
<p>Since native RSS format is not designed to deliver media content, there is a need for newer format supporting video and audio. There is such format &#8211; <a title="Media Rss Yahoo!" href="http://video.search.yahoo.com/mrss" target="_blank">Media RSS</a> introduced by Yahoo! in 2004. Actually now RSS supports some king of pseudo audio and video with the enclosure tag.</p>
<p><a href="/wp-content/uploads/2010/07/radio-media.jpeg"><img class="aligncenter size-full wp-image-1804" title="Radio Set" src="/wp-content/uploads/2010/07/radio-media.jpeg" alt="Inserting Media In RSS with Media RSS" width="430" height="322" srcset="/wp-content/uploads/2010/07/radio-media.jpeg 430w, /wp-content/uploads/2010/07/radio-media-300x224.jpg 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<p>Although there is a standardized format, there is not a Zend Framework native module. There is however a <a title="Zend Framework and Media RSS" href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Feed_Writer_Extension_MediaRSS+-+Justin+Hart" target="_blank">proposal</a>, but that&#8217;s far not enough.</p>
<h2>Possible Solutions</h2>
<p>For me there are two possible solutions. The first is writing Zend_Feed_Mrss and extend the <a href="http://framework.zend.com/apidoc/core/Zend_Feed/Zend_Feed_Rss.html" target="_blank">Zend_Feed_Rss</a> functionality, but that appears to be a non-trivial task. The second solution is to write custom view returning XML, which I&#8217;m choosing for now. I hope I can paste some code soon!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/07/14/media-rss-and-zf-part-2/" rel="bookmark" title="Media RSS and ZF &#8211; Part 2">Media RSS and ZF &#8211; Part 2 </a></li>
<li><a href="/2010/04/28/zend_datesetoptions-and-format_type-in-zend-framework-1-10-3/" rel="bookmark" title="Zend_Date::setOptions and format_type in Zend Framework 1.10.3">Zend_Date::setOptions and format_type in Zend Framework 1.10.3 </a></li>
<li><a href="/2010/04/30/burn-feeds-in-zend-framework/" rel="bookmark" title="Burn Feeds in Zend Framework">Burn Feeds in Zend Framework </a></li>
<li><a href="/2010/08/23/can-twitter-replace-the-rss-feed-readers/" rel="bookmark" title="Can Twitter Replace the RSS Feed Readers">Can Twitter Replace the RSS Feed Readers </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/07/13/zend-framework-and-media-rss/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Name for AJAX</title>
		<link>/2010/04/27/new-name-for-ajax/</link>
		<comments>/2010/04/27/new-name-for-ajax/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 16:14:28 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">/?p=1493</guid>
		<description><![CDATA[Should it be called AJAJ since there&#8217;s more JSON instead of XML?!<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/11/03/ajax-datatypes-in-jquery-format-and-access/" rel="bookmark" title="AJAX dataTypes in jQuery. Format and access.">AJAX dataTypes in jQuery. Format and access. </a></li>
<li><a href="/2009/03/19/jquery-ajax-script-call/" rel="bookmark" title="JQuery ajax script call">JQuery ajax script call </a></li>
<li><a href="/2011/10/10/php-does-simplexmlelement-have-tostring-method-no-better-use-asxml/" rel="bookmark" title="PHP: Does SimpleXMLElement have toString() method? No, better use asXML()!">PHP: Does SimpleXMLElement have toString() method? No, better use asXML()! </a></li>
<li><a href="/2009/11/02/ajax-in-jquery/" rel="bookmark" title="$.ajax in jQuery">$.ajax in jQuery </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Should it be called AJAJ since there&#8217;s more JSON instead of XML?!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/11/03/ajax-datatypes-in-jquery-format-and-access/" rel="bookmark" title="AJAX dataTypes in jQuery. Format and access.">AJAX dataTypes in jQuery. Format and access. </a></li>
<li><a href="/2009/03/19/jquery-ajax-script-call/" rel="bookmark" title="JQuery ajax script call">JQuery ajax script call </a></li>
<li><a href="/2011/10/10/php-does-simplexmlelement-have-tostring-method-no-better-use-asxml/" rel="bookmark" title="PHP: Does SimpleXMLElement have toString() method? No, better use asXML()!">PHP: Does SimpleXMLElement have toString() method? No, better use asXML()! </a></li>
<li><a href="/2009/11/02/ajax-in-jquery/" rel="bookmark" title="$.ajax in jQuery">$.ajax in jQuery </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/04/27/new-name-for-ajax/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cross-browser rounded corners! Works on IE but, but not on Opera!</title>
		<link>/2010/02/15/cross-browser-rounded-corners-works-on-ie-but-but-not-on-opera/</link>
		<comments>/2010/02/15/cross-browser-rounded-corners-works-on-ie-but-but-not-on-opera/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 19:29:38 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Graphics file formats]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Markup languages]]></category>
		<category><![CDATA[Vector graphics markup languages]]></category>
		<category><![CDATA[Vector Markup Language]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[Web standards]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">/?p=1091</guid>
		<description><![CDATA[What&#8217;s this that works on IE and any other browser, except on Opera?! Rounded Corners That was a strange answer. Who&#8217;s making rounded corners with CSS?! on IE and more important how? There is a way to make it, but not entirely with CSS and HTML. The solution is with VML a subset of XML &#8230; <a href="/2010/02/15/cross-browser-rounded-corners-works-on-ie-but-but-not-on-opera/" class="more-link">Continue reading <span class="screen-reader-text">Cross-browser rounded corners! Works on IE but, but not on Opera!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/02/17/htc-round-the-corners-on-ie/" rel="bookmark" title="HTC?! Round the corners on IE!">HTC?! Round the corners on IE! </a></li>
<li><a href="/2010/02/12/css-border-radius-vs-images/" rel="bookmark" title="CSS border-radius vs. images!">CSS border-radius vs. images! </a></li>
<li><a href="/2009/03/12/javascript-rounded-corners/" rel="bookmark" title="JavaScript rounded corners">JavaScript rounded corners </a></li>
<li><a href="/2010/03/27/vendor-prefixes-in-css/" rel="bookmark" title="Vendor Prefixes in CSS">Vendor Prefixes in CSS </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>What&#8217;s this that works on IE and any other browser, except on Opera?!</p>
<h2>Rounded Corners</h2>
<p>That was a strange answer. Who&#8217;s making rounded corners with CSS?! on IE and more important how? There is a way to make it, but not entirely with CSS and HTML. The solution is with VML a subset of XML to deal with vectors, and CSS of course.</p>
<p>The original solution I found on <a title="Rounded Corners experiment IE" href="http://snook.ca/archives/html_and_css/rounded_corners_experiment_ie/" target="_blank">snook.ca</a>.</p>
<p>It is really working fine as described and shown in the example, but there are some issues as well. There is no way to setup background image on the container, and the width and height are behaving strange.</p>
<p>However this gives you an opportunity to make cross browser rounded corners with no scripting that slows down the page and except Opera it&#8217;s quite working!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/02/17/htc-round-the-corners-on-ie/" rel="bookmark" title="HTC?! Round the corners on IE!">HTC?! Round the corners on IE! </a></li>
<li><a href="/2010/02/12/css-border-radius-vs-images/" rel="bookmark" title="CSS border-radius vs. images!">CSS border-radius vs. images! </a></li>
<li><a href="/2009/03/12/javascript-rounded-corners/" rel="bookmark" title="JavaScript rounded corners">JavaScript rounded corners </a></li>
<li><a href="/2010/03/27/vendor-prefixes-in-css/" rel="bookmark" title="Vendor Prefixes in CSS">Vendor Prefixes in CSS </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/02/15/cross-browser-rounded-corners-works-on-ie-but-but-not-on-opera/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using Zend Framework validators &#8211; Zend_Validate_Db_RecordExists</title>
		<link>/2010/01/25/using-zend-framework-validators-zend_validate_db_recordexists/</link>
		<comments>/2010/01/25/using-zend-framework-validators-zend_validate_db_recordexists/#respond</comments>
		<pubDate>Mon, 25 Jan 2010 05:57:50 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Computer programming]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Integrated development environments]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Software framework]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Validator]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[web form]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Zend_Validate_Db_RecordExists]]></category>

		<guid isPermaLink="false">/?p=854</guid>
		<description><![CDATA[What are validators? In very very breve these are methods which can validate some data, usually user input, against some specific rules. Imagine there’s a web form that is always checked for empty fields or some fields that may contain valid e-mail addresses. This is so common that became everyday routine to almost all of &#8230; <a href="/2010/01/25/using-zend-framework-validators-zend_validate_db_recordexists/" class="more-link">Continue reading <span class="screen-reader-text">Using Zend Framework validators &#8211; Zend_Validate_Db_RecordExists</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/07/22/zend_validate_db_recordexists-in-zend-framework-1-10/" rel="bookmark" title="Zend_Validate_Db_RecordExists in Zend Framework 1.10+">Zend_Validate_Db_RecordExists in Zend Framework 1.10+ </a></li>
<li><a href="/2010/07/06/zend-framework-simple-acl-front-controller-plugin/" rel="bookmark" title="Zend Framework: Simple Acl Front Controller Plugin">Zend Framework: Simple Acl Front Controller Plugin </a></li>
<li><a href="/2010/06/10/json-and-zend-framework-zend_json/" rel="bookmark" title="JSON and Zend Framework? &#8211; Zend_Json">JSON and Zend Framework? &#8211; Zend_Json </a></li>
<li><a href="/2010/08/06/setting-up-zend-framework-with-modules/" rel="bookmark" title="Setting Up Zend Framework with Modules">Setting Up Zend Framework with Modules </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>What are validators?</h2>
<p>In very very breve these are methods which can validate some data, usually user input, against some specific rules. Imagine there’s a web form that is always checked for empty fields or some fields that may contain valid e-mail addresses. This is so common that became everyday routine to almost all of us. However smart developers make abstractions that help them reuse all this functionality. Even smarter developers make use of frameworks. And for those of you, using Zend Framework, there’s no need to write most of the common used validators, simply because they come with the framework itself.</p>
<p>Technically you’ve various validators in zend, such as <strong>Zend_Validate_Alnum</strong>, <strong>Zend_Validate_Email</strong> or <strong>Zend_Validate_Regex</strong>. All these are extremely useful when it comes to automatic, bullet proof validation, but I’m going to talk more about one specific validator.</p>
<h2>Zend_Validate_Db_RecordExists</h2>
<p>Although the implementation is nothing more than just a chunk of code and doesn’t pretend to be difficult, the idea of such validator is genius indeed. It really helps you do some amazing job.</p>
<p>Image you have to check some database record existence. Then comes in help this validator. In fact I’m pretty sure almost everyone has experience with such kind of task. Simply because the registration process almost always requires it. When you try to register new user you more often check for the username existence. Although you may solve the problem with other technique by catching the exception the database is throwing for duplicate entries, this should be assumed just as an example.</p>
<p>I’m pretty sure this validator can be really useful in many occasions!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/07/22/zend_validate_db_recordexists-in-zend-framework-1-10/" rel="bookmark" title="Zend_Validate_Db_RecordExists in Zend Framework 1.10+">Zend_Validate_Db_RecordExists in Zend Framework 1.10+ </a></li>
<li><a href="/2010/07/06/zend-framework-simple-acl-front-controller-plugin/" rel="bookmark" title="Zend Framework: Simple Acl Front Controller Plugin">Zend Framework: Simple Acl Front Controller Plugin </a></li>
<li><a href="/2010/06/10/json-and-zend-framework-zend_json/" rel="bookmark" title="JSON and Zend Framework? &#8211; Zend_Json">JSON and Zend Framework? &#8211; Zend_Json </a></li>
<li><a href="/2010/08/06/setting-up-zend-framework-with-modules/" rel="bookmark" title="Setting Up Zend Framework with Modules">Setting Up Zend Framework with Modules </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/25/using-zend-framework-validators-zend_validate_db_recordexists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
