Zend Framework Interview Questions and Answers

Zend Framework Interview Questions and Answers
1.What is a Framework?
In software development, a framework is a defined support structure in which another software project can be organized and developed.
  • An abstract design
  •  Set of common functionality
  •  Developed for a particular domain
 2.How to disable layout from controller?
$this->_helper->layout()->disableLayout();
Disable Zend Layout from controller for Ajax call only
if($this->getRequest()->isXmlHttpRequest()){
$this->_helper->layout()->disableLayout();
}
3.How to change the View render file from controller?
function listAction(){
//call another view file file
$this->render(“anotherViewFile”);
}
4.How to protect your site from sql injection in zend when using select query?
$select = $this->select()
from(array(‘u’ => ‘users’), array(‘id’, ‘username’))
where(‘name like ?’,”%php%”)
where(‘user_id=?’,’5′)
where(‘rating<=?’,10);
5.How to check post method in zend framework?
if($this->getRequest()->isPost()){
//Post
}else{
//Not post
}

Comments

Popular posts from this blog

Devops Interview Questions and Answers

Python Real Time Interview Questions and Answers

How AWS Training Is Helpful for Companies