Zend Form Password Confirmation

$this->addElement(
‘password’, ‘password’, array(
‘label’ => ‘Password:’,
),
));

$this->addElement(
‘password’, ‘password_confirm’, array(
‘label’ => ‘Confirm Password:’,
),
‘validators’ => array(array(‘Identical’, false, ‘password’)),
));

Zend Lucene sample

<?php

class TestController extends Zend_Controller_Action
{

	public function init()
	{
		/* Initialize action controller here */
	}

	/**
	 * Index page action
	 */

	public function createAction()
	{
			
		$articlesData =    array (
		0 => array(
				"url" 		=> "http://ganeshhs.com/url-1",
				"title"	    => "Google suggest : pick right search keyword",
				"contents"	=> "Picking the right keywords for the websites is the success of search engine marketing. When i started search engine optimization, i used to use overture keyword selector tool and check the search counts what other users have searched. ",
				"category"	=> "Google",
				"postedDateTime" => "2007-12-26 12:20:00",
				"articleId"	=> 1),
		1 => array(
				"url" => "http://ganeshhs.com/url-2",
				"title"	     => "zend framework tutorial | part 9 Zend Auth",
				"contents"	 => "Zend Auth is easy to set up and provides a system that secures our site with an easy to use  authentication mechanism. Zend Auth(Zend_Auth) provides an API for authentication. ",
				"category"	     => "zend-framework",
				"postedDateTime" => "2007-12-26 12:20:00",
				"articleId"	     => 2));

		if(is_array($articlesData) && count($articlesData))
		{
			$index = Zend_Search_Lucene::create('c:\\temp\\lucy\\test');
			foreach($articlesData as $articleData)
			{
				$doc = new Zend_Search_Lucene_Document();

				$doc->addField(Zend_Search_Lucene_Field::Keyword('url', $articleData["url"]));
				$doc->addField(Zend_Search_Lucene_Field::UnIndexed('articleId', $articleData["articleId"]));
				$doc->addField(Zend_Search_Lucene_Field::UnIndexed('postedDateTime', $articleData["postedDateTime"]));
				$doc->addField(Zend_Search_Lucene_Field::Text('title', $articleData["title"]));
				$doc->addField(Zend_Search_Lucene_Field::Text('contents', $articleData["contents"]));
				$doc->addField(Zend_Search_Lucene_Field::Text('category', $articleData["category"]));

				echo "Adding: ". $articleData["title"] ."\n";

				$index->addDocument($doc);

			}
			$index->commit();
			$index->optimize();

			$this->view->message = "created";
		}
			
	}

	public function addAction(){

		$index = Zend_Search_Lucene::open("c:\\temp\\lucy\\test");

		$doc = new Zend_Search_Lucene_Document();
		$doc->addField(Zend_Search_Lucene_Field::Keyword('url',"http://ganeshhs.com/url-3"));
		$doc->addField(Zend_Search_Lucene_Field::UnIndexed('articleId',		3));
		$doc->addField(Zend_Search_Lucene_Field::UnIndexed('postedDateTime',"20007-12-29 01:40:00"));
		$doc->addField(Zend_Search_Lucene_Field::Text('title',"Porting PHP to Javascript : php js keyword"));
		$doc->addField(Zend_Search_Lucene_Field::Text('contents',"During graduation got interested in web technology, to kick start i started reading html, javascript."));
		$doc->addField(Zend_Search_Lucene_Field::Text('category',"Javascript"));

		$index->addDocument($doc);
		$index->commit();
		$index->optimize();

		$this->view->message = "added";
	}


	public function retrieveAction(){

		$queryStr= $this->_getParam('filter');
		$query = Zend_Search_Lucene_Search_QueryParser::parse($queryStr);
		$index = Zend_Search_Lucene::open("c:\\temp\\lucy\\test");
		$index->setResultSetLimit(2);
		$results = $index->find($query);

		echo "Index contains ".$index->count()." documents.\n\n";
		if($index->count())
		{
			$count = 0;
			foreach ($results as $result)
			{
				$data[$count]["article_url"]         = $result->url;
				$data[$count]["article_title"]        = $query->highlightMatches($result->title);
				$data[$count]["article_description"]        = $query->highlightMatches($result->contents);
				$data[$count]["article_created_date_time"]    = $result->postedDateTime;
				$data[$count]["article_id"]             = $result->articleId;
				$count++;
			}
		}
		$this->view->data = $data;
		$this->view->message = 'retrieved';

	}

	public function searchAction(){
		
		$queryStr= $this->_getParam('filter');
		
		$query = Zend_Search_Lucene_Search_QueryParser::parse($queryStr);
		$index = Zend_Search_Lucene::open("c:\\temp\\lucy\\test");
		$results = $index->find($query);

		echo "Index contains ".$index->count()." documents.\n\n";
		if($index->count())
		{
			$count = 0;
			foreach ($results as $result)
			{
				$data[$count]["article_url"]         = $result->url;
				$data[$count]["article_title"]        = $query->highlightMatches($result->title);
				$data[$count]["article_description"]        = $query->highlightMatches($result->contents);
				$data[$count]["article_created_date_time"]    = $result->postedDateTime;
				$data[$count]["article_id"]             = $result->articleId;
				$count++;
			}
		}
		
		$this->view->data = $data;
		$this->view->message = 'searched';
	}
}