Top 10 Yii Interview Questions and Answers for fresher
Today, We want to share with you Top 10 Yii Interview Questions and Answers for fresher.
In this post we will show you YII interview questions and answers for fresher, hear for Yii Interview Questions and Answers we will give you demo and example for implement.
In this post, we will learn about Top 10 YII Interview Questions & Answers with an example.
What is Yii?
Yii framework is a one type of the PHP framework which is based on pure MVC basic structure(Model View Controller).
What is current stable version of Yii?
Latest Version of yii framework in php is : 2.0.7 dated February 14, 2016.
Application Life Cycle of Yii framework ?
- phase 1 : Pre-initialize the application with CApplication::preinit();
- phase 2 : Set up the simple class autoloader and error handling;
- phase 3 : Register core seimpl web-application components;
- phase 4 : Load application easy setup configuration;
- phase 5 : Initialize the web-application with CApplication::init() base
- phase 6 : Raise an onBeginRequest event;
- phase 7 : Process the user request:
- phase 8 : Raise an onEndRequest generate event;
• Register web-application behaviors;
• Load static new application components;
• Collect information about the request;
• new Create a new controller;
• Run the simple controller;
How to get current controller id in Yii ?
$controllerid = Yii::app()->controller->id;
How to get current action id in Yii ?
$actionid = Yii::app()->controller->action->id;
What are the type of models available in Yii framework ?
Form models and
List out some database related functions in Yii?
- find By
What is the first file that gets loaded when you run a application using Yii framework?
How can we use ajax in Yii?
By the calling ajax helper model routing and then using it in controller to data routing for rendering.
what is directory structure for Yii framework?
/ backend/ common/ components/ config/ params.php params-local.php * lib/ Pear/ yii/ Zend/ migrations/ models/ Comment.php Extension.php ...some files console/ commands/ SitemapCommand.php ...some files config/ main.php main-local.php * params.php params-local.php * runtime/ yiic.php * frontend/ components/ config/ main.php main-local.php * params.php params-local.php * controllers/ SiteController.php ...some files lib/ models/ ContactForm.php SearchForm.php runtime/ views/ layouts/ site/ www/ assets/ css/ js/ index.php * yiic yiic.bat