Zend Certificate Sample Question

Question No : 1 Fill in the blank with the appropriate PHP function. The_____________ function is used to replace the current session id with the new session id, and to keep information of the current session. A. session_regenerate_id() Question No : 2 Celina works as a Database Administrator for Tech Mart Inc. The company uses an Oracle database. The database …

Continue Reading

Regx validation in Zend Framework

Regx validation in Zend Framework Here showing Email validation.  $email = new Zend_Form_Element_Text(’email_address’); $email->setLabel(‘Email Address:’) ->addValidators( array( array(‘regex’, false, array(‘pattern’ => ‘/^.+@.+..{2,}$/i’)))) ->setRequired(true) ->setAttribs(array(‘id’ => ’email_address’, ‘class’ => ‘input-text-field’)) ->addErrorMessage(‘please enter a valid email address’);

Continue Reading

Zend PHP 5.3 certification practice question

1.    What will be the output of following code.Options <?php echo 1  .  2; ?> 2.    is_float() is a valid php function?. Options A. True B. False 3.    What will be the output <?php $stack = array(“orange”, “banana”, “apple”, “raspberry”); $fruit = array_shift($stack); print_r($fruit); ?> A. array(“orange”,”banana”,”apple”) B. array(“”banana”,”apple”,”raspberry”) C. Number of parameter passed is incorrect D. orange 4.    What …

Continue Reading

Zend Framework – Hello World

Quick Start Zend Framework Hello World Program Install Zend Framwork1.11 on you localhost Create your file system application/ controllers/ IndexController.php models/ views/ scripts/ index/ index.phtml helpers/ filters/ html/ .htaccess index.php Rewrite .htaccess file     RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s OR RewriteCond %{REQUEST_FILENAME} -l OR RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ – NC,L RewriteRule ^.*$ index.php NC,L Open the file application/controllers/IndexController.php, and …

Continue Reading

How to declear a table name in zend farmework

class Model_DbTable_User extends Zend_Db_Table_Abstract { protected $_name;// = ‘users ‘; public function init() { $this->_name = ‘users’; } } …………………………………………………………………………………………………………. Model_DbTable_User => model/DbTable/user.php protected $_name => Initialize to variable $this->_name = ‘users’ => Initialize to users Table.

Continue Reading

How to upload a file like image, video and audio

just follow the instruction i hope will be work nicely. At first create a url path for upload. public/index.php defined ( ‘UPLOAD_PATH’ ) || define ( ‘UPLOAD_PATH’, realpath ( dirname ( __FILE__ ) . ‘/../docs’ ) );// “/../docs” your file location where u want to upload your file. In your form just add below element tag. $image = new Zend_Form_Element_File …

Continue Reading

Populating DB data to a Zend Form dropdown element

$country_name = new Zend_Form_Element_Select(‘c_id’, array( ‘decorators’ => $this->elementDecorators, ‘label’ => ‘COUNTRY’, ‘attribs’ => array(‘id’ => ‘c_id’, ‘class’ => ‘input-text-field’), ‘required’ => true, ‘filters’ => array(‘StringTrim’) )); $c_table = new Application_Model_DbTable_Country(); foreach ($c_table->findForSelect() as $c) { $country_name->addMultiOption($c->c_id, $c->c_name); } //Application/Model/DbTable/Country.php class Application_Model_DbTable_Country extends Zend_Db_Table_Abstract { protected $_name = ‘country’;//’country is a table name’ public function findForSelect() { $select = $this->select(); return …

Continue Reading

How to Add HTML into Zend_Form_Element label

This is very simple add a html into  Zend_Form_Element label just follow given code i hope it will be help for u.   $checkbox->setLabel(‘ <a href=”/auth/forgot”> Forgot Password </a>’); $element->setDecorators(array(array(‘Label’, array(‘escape’ => false)))); This worked for the HTML part as my link now appeared, but I didn’t see my checkbox, just the label. So looking at the method name I …

Continue Reading

Using the CLI Tool

Version zf show version mode=mini name-included=1 Note: There are specialties, use zf show version.? to get specific help on them.   Config zf create config zf show config zf enable config Note: There are specialties, use zf enable config.? to get specific help on them. zf disable config Note: There are specialties, use zf disable config.? to get specific help …

Continue Reading

What is Zend Framework?

Zend Framework is a fully object-oriented framework,it is utilizes a lot of object-oriented (OO) concepts like object, class, inheritance and interfaces. Zend Framework components extendable to some point. It allows developers to implement their own special variations of individual components without having to hack into the ZF codebase itself. Zend Framework is very simple, straightforward, open-source software framework. Its strength …

Continue Reading