These Symfony2 multiple-choice questions and their answers will help you strengthen your grip on the subject of Symfony2. You can prepare for an upcoming exam or job interview with these 70+ Symfony2 MCQs.
So scroll down and start answering.
A. NotEqualTo
B. EqualTo
C. UniqueEntity
D. All of these are supported
A. Convert a Request to a Response
B. Standardize and centralize the way objects are constructed in your application
C. Defining the Controller as a Service
D. Parse the URL and determine which controller should be executed
A. False
B. True
A. Crawlers
B. Assets
C. Doctrine
D. Assetic
A. HttpFoundation
B. Translation
C. Routing
D. ClassLoader
A. work
B. prod
C. test
D. dev
A. generateURL()
B. createURL()
C. URLgenerator()
D. URLcreate()
A. False
B. TRUE
A. PHP 5.1.2 and up
B. PHP 4.3.3 and up
C. PHP 5.3.3 and up
D. PHP 4.1.2 and up
A. forward()
B. progress()
C. send()
D. sent()
A. Translation
B. Routing
C. ClassLoader
D. HttpFoundation
A. app/src
B. app/config
C. app/console
D. app/Resources
A. {# app/Resources/views/layout.html.twig #} <!DOCTYPE html> <html> <head> <title>{% block title %}Default title{% endblock %}</title> </head> <body> {% block body %}{% endblock %} </body> </html>
B. None of these
C. // app/AppKernel.php public function registerBundles() { $bundles = array( ..., new Smarterer\HelloBundle\SmartererHelloBundle(), ); // ... return $bundles; }
D. // src/Smarterer/HelloBundle/Controller/HelloController.php namespace Smarterer\HelloBundle\Controller; use Symfony\Component\HttpFoundation\Response; class HelloController { public function indexAction($name) { return new Response('<html><b
A. src/
B. web/
C. vendor/
D. app/
A. instantloader
B. autoupload
C. autoloader
D. instantupload
A. The app/ directory
B. The kernal/ directory
C. The application/ directory
D. The class/ directory
A. Request
B. Send
C. Call
D. Inbound
A. Bark
B. Tree
C. Twig
D. Branch
A. Numbers
B. All of these
C. Dates and Times
D. Strings
A. boolean
B. superint
C. integer
D. tinyint
A. Bundler
B. Bower
C. composer
D. NuGet
E. Symfony2 DI
A. Set csrf_protection to true
B. Set csrf_protection to false
A. app, test, and web
B. app, test, and prod
C. test, dev, and prod
D. test, src, and prod
A. view:controller:model
B. action:bundle:route
C. bundle:controller:action
D. controller:action:model
A. {% child %}
B. {% extends %}
C. {% parent %}
D. {% inherit %}
A. It forces the secure route to avoid using HTTPS
B. It forces the route to never use path /secure
C. It forces the route to always use path /secure
D. It forces the secure route to always use HTTPS
A. AppKernel
B. AppPhp
C. AppBundle
D. class AppSrc
A. Action
B. Asset
C. Bundle
D. Application
A. It tells Symfony which controller should be executed when a URL does not match a specific route
B. It tells Symfony which controller should be executed when a URL matches a specific route
C. It tells Symfony how to access another controller internally
D. It tells Symfony which container is used for key/value pairs
A. True
B. FALSE
A. False
B. True
A. FALSE
B. TRUE
A. Locally in the bundle in the Resources/config/services.yml
B. Locally in the bundle in the Sources/config/services.yml
C. Locally in the bundle in the Sources/config/server.yml
D. None of these
A. route
B. view
C. model
D. controller
A. controller
B. model
C. path
D. route
A. True
B. False
A. True
B. False
A. Download an Archive or use Installer
B. None of these
C. Use Composer or Installer
D. Use Composer or Download an Archive
A. isSecure()
B. isSafe()
C. forward()
D. indexAction()
A. $this->serviceContainer.get('name_service');
B. $serviceTest = get('name_service')
C. $this->getInstance('name_service');
D. $serviceTest = getInstance('name_service');
E. $this->get('name_service');
A. trash()
B. flush()
C. delete()
D. remove()
A. A map from a controller to a URL path
B. A container for key/value pairs
C. A map from a URL path to a controller
D. A simple object-oriented representation of the HTTP request message
A. (all of these)
B. Controller/
C. Resources/config/
D. Tests/
A. renderTemplate
B. renderView
C. renderControl
D. renderPage
A. TRUE
B. False
A. ParameterCase
B. ParameterBag
C. ParameterBatch
D. ParameterGroup
A. Front Controller
B. Back Controller
C. All of these
D. Controller
A. Class Name is used in place of Class ID
B. The class name and the path to the file do not follow the same sequence
C. All of these
D. The class name and the path to the file follow the same sequence
A. a class that work with all the repositories in a bundle
B. a class which extends EngineRepository
C. a symfony file for saving test classes
D. a class that work with entity for processing data
E. the main directory of entities
A. It shows the swiftmailer is configured to deliver emails in the live environment
B. It shows the swiftmailer is configured to deliver emails in the test environment
C. It shows the swiftmailer is NOT configured to deliver emails in the live environment
D. It shows the swiftmailer is NOT configured to deliver emails in the test environment