Saturday, April 30, 2016

Cake Php MCQ Question for exam

Posted by Tech Talim

1.       What are 3 important parts of MVC?  

A.    The Model represents the application data
B.      The View renders a presentation of model data
C.     Module represents the application part.
D.    The Controller handles and routes requests made by the client
Ans: A, B,D
2.       The view layer in CakePHP can be made up of a number of different parts. What are the different parts of view layer?
A.      View
B.      Element
C.      Controller
D.      Model
E.       Helper
Ans: A, B,E
3.       Which block of the content contains the content of the render view?
A.      Content block
B.      Title Block
C.      Section Block
Ans: A
4.       What are the relationship types in CakePHP?
A.      HasOne
B.      ManytoMany
C.      HasMany
D.      belongsTo
Ans: A,C,D
5.       Cake PHP is a PHP framework package which enables you to develop custom applications. It supports a MVC based architecture.
A.      TRUE
B.      False
Ans: A
6.       what is the first file that gets loaded when you run an application using cakephp.
A.      Index.php
B.      Bootstrap.php
C.      Core.php
D.      Database.php
Ans:  B
7.       What is the first function that gets loaded from a controller?
A.      About
B.      Index
C.      Delete
D.      Edit
Ans: B
8.       What are the lists of some database related functions in cakephp?
A.      Find
B.      FindAll
C.      Create
D.      Query
Ans: A,B,C
9.       What is the name of Cake’s database configuration file?
A.      Datasource
B.      Database
C.      database.php.default
Ans: C
10.   What are commonly used components of cakephp?
A.      Security
B.      Database
C.      Session
D.      Helper
Ans: A,C
11.   CakePHP allows you to set up a combination of controllers, models, and views and release them as a packaged application.
A.      Helper
B.      Plugin
C.      Views
D.      Behavior
Ans: B
12.   Sessions can be configured in a number of ways in CakePHP
A.      $this->Session->write('Person.eyeColor', 'Green');
B.      array('User' => array(  'username' => 'clark-kent@dailyplanet.com'));
C.      'username' => 'clark-kent@dailyplanet.com';
D.      array(  'username' => 'clark-kent@dailyplanet.com'));
Ans: A,B
13.   How to retrieve the session value in CakePHP?
A.      $green = $this->Session->retrieve('Person.eyeColor');
B.      $green = $this->Session->get('Person.eyeColor');
C.      $green = $this->Session->read('Person.eyeColor');
Ans: C

14.   Which method will delete the session cookie and all session data stored in the temporary file system?
A.      Nullable()
B.      destroy()
C.      unset()
Ans: B
15.   In CakePHP, what are the several built-in ways of authenticating users stored in your application.
A.      FormAuthenticate
B.      Da



0 comments:

Post a Comment