Our experts have gathered these CakePHP MCQs through research, and we hope that you will be able to see how much knowledge base you have for the subject of CakePHP by answering these 20 multiple-choice questions.
Get started now by scrolling down!
A. All of these
B. Controller
C. View
D. Model
A. Yes, create a component
B. Yes, in the routes
C. Yes, in the model
D. No, good luck
E. Yes, as a controller function
A. None of these
B. App::uses('AppModel', 'Model'); class Ingredient extends AppModel { public $name = 'Ingredient'; }
C. CakePlugin::loadAll(); // Loads all plugins at once CakePlugin::load('ContactManager'); //Loads a single plugin
D. class IngredientsController extends AppController { public function index() {
A. $this->Form->input("fieldname.$i.Modelname");
B. $this->Form->input("$i.Modelname.$i.fieldname");
C. $this->Form->input("Modelname.$i.fieldname");
D. $this->Form->input("$i.fieldname");
A. True
B. False
A. CSRF protection
B. Form tampering protection
C. All of these
D. Restricting which HTTP methods the application accepts
E. Requiring that SSL be used
A. index.php
B. bootstrap.php
A. how deep CakePHP should go to fetch associated model data via find(), and read() methods
B. how many records to fetch by data via find(), and read() methods
C. how many time the find(), and read() methods are called
A. Set document root to app/webroot
B. Make sure data is sanitized and validated
C. Disable debug messages in core.php
D. Disable exception stack traces
E. All of them
A. It sets the initial configuration for plugins and caching.
B. It builds and manages paths to various components of the application.
C. It is responsible for converting the POST parameters into a request object.
D. None of these.
E. It is the parent class to all of the application’s controllers.
A. Common Timing Protocol
B. Twig Template
C. PHP Container File
D. CakePHP Template
E. misnamed
A. None of these
B. public function beforeFilter() { parent::beforeFilter(); }
C. class AppController extends Controller { }
D. $data = array( 'color' => 'pink', 'type' => 'sugar'
A. none of above
B. models only
C. models and views only
D. models, views and controllers
E. models and controllers only
A. False
B. True
A. Module-vector-core
B. Maximum-velocity-counter
C. Modular-view-controlling
D. Model-view-controller
A. True
B. False
A. index() function
B. _index() function
C. control() function
D. None of these
E. main() function
A. index
B. view
C. default
D. add
A. find('list', $options)
B. find('one', $options)
C. find('first', $options)
D. find('threaded', $options)
E. find('all', $options)
A. firstFilter
B. beforeFilter
C. All of above
D. afterFilter
A. <?php echo $this->element('element_name'); ?>
B. <?php include('element_name'); ?>
C. <?php echo $this->set('element_name'); ?>
D. <?php echo $this->include('element_name'); ?>
A. grunt
B. rake
C. cake
D. composer
E. bake
A. find('select')
B. find('first')
C. find('list')
D. find('all')
E. field('list')