CakePHP MCQ Questions & Answers

CakePHP MCQs : This section focuses on "CakePHP" of PHP Framework. These Multiple Choice Questions (MCQ) should be practiced to improve the CakePHP skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. Which of the following is true about cakephp?

A. CakePHP is an open source MVC framework.
B. CakePHP makes developing, deploying and maintaining applications much easier.
C. CakePHP has a number of libraries to reduce the overload of most common tasks.
D. All of the above

View Answer


2. Which of the following is not an advantage of CakePHP?

A. Hard CRUD
B. Built-in Validation
C. Search Engine Friendly URLs
D. MVC Framework

View Answer


3. The view uses ___________ to generate the response body and headers.

A. Helpers
B. Cells
C. Helpers and Cells
D. None of the above

View Answer


4. Which folder holds the Cake console executables?

A. config
B. bin
C. logs
D. plugins

View Answer


5. Which methods cannot be accessed with routing?

A. Public
B. Private
C. Protected
D. Both B and C

View Answer


6. Which directory is the public document root of your application?

A. webroot
B. vendor
C. tmproot
D. testroot

View Answer


7. Which function is used to read the configuration for the environment you need and build your application?

A. environment()
B. env()
C. config.env()
D. config.environment()

View Answer


8. Configuration for Email defaults is created using ?

A. config() 
B. configTransport()
C. configEmail()
D. Both A and B

View Answer


9. Can we use extension .ctp while providing the name of the View file?

A. Yes
B. No
C. Can be yes or no
D. Can not say

View Answer


10. Which method is called after the view has been rendered, but before the layout rendering has started?

A. Helper::afterRender(Event $event, $viewFile)
B. Helper::beforeLayout(Event $event, $layoutFile)
C. Helper::afterLayout(Event $event, $layoutFile)
D. Helper::afterRenderFile(Event $event, $viewFile, $content)

View Answer


11. The _______ method will take the name of the database table as an argument.

A. put()
B. set()
C. get()
D. select()

View Answer


12. How many types of Authentication CakePHP supports?

A. 2
B. 3
C. 4
D. 5

View Answer


13. Which allows you to authenticate users based on form POST data?

A. FormAuthenticate 
B. BasicAuthenticate 
C. DigestAuthenticate 
D. All of the above

View Answer


14. Which allows you to authenticate users using Digest HTTP authentication?

A. FormAuthenticate 
B. BasicAuthenticate 
C. DigestAuthenticate 
D. None of the above

View Answer


15. What is the data type for exceptionRenderer?

A. int
B. bool
C. array
D. string

View Answer


16. What is true about errorLevel?

A. The level of errors you are interested in capturing
B. Include stack traces for errors in log files.
C. The class responsible for rendering uncaught exceptions.
D. An array of exception class names that should not be logged.

View Answer


17. The log() function is provided by the?

A. Logging
B. LogTrait
C. datalog
D. cronjob

View Answer


18. What is the first file that gets loaded when you run an application using a cakephp?

A. index.php
B. config.php
C. bootstrap.php
D. core.php

View Answer


19. Which of email transports can be used in CakeEmail?

A. Only Mail and Smtp
B. Mail, Smtp and your own
C. Only Mail
D. Only Smtp

View Answer


20. Which by is not a core find type provided by CakePHP?

A. first
B. all
C. active
D. threaded

View Answer





Discussion



* You must be logged in to add comment.