Symfony Certification

Description

Symfony Digital Technologies Flashcards on Symfony Certification, created by Nash Delos Santos on 13/03/2017.
Nash Delos Santos
Flashcards by Nash Delos Santos, updated more than 1 year ago
Nash Delos Santos
Created by Nash Delos Santos about 7 years ago
40
0

Resource summary

Question Answer
[Arrays] Which of the following functions could be used to break a string into an array? preg_match_all(), split(), explode()
[OOP] What three special methods can be used to perform special logic in the event a particular accessed method or member variable is not found? __set($variable, $value), __call($method, $params), __get($variable)
[Automated tests] Using PHPUnit, which method allows you to expect an exception to be thrown? $this->setExpectedException('MyException')
[Routing] Using XML or YAML, how to declare a route for a specific domain/host? Add a "host" attribute
[Dependency Injection] Which of these methods are available in ContainerInterface? addScope($name), enterScope($name)
[The Command Line] What is the right command name to load Doctrine fixtures? php app/console doctrine:fixtures:load
The ____ construct is particularly useful to assign your own variable names to values within an array list
[Strings and Patterns] Identify the best approach to compare to variables in a binary-safe fashion strcmp() and $a === $b
[Functions] What is the best way to ensure that a user-defined function is always passed an object as its single parameter? function myfunction(stdClass $a)
[Dependency Injection] Which types of injection are available in the component? method, property, constructor
[Standardization] Service naming conventions: select all valid services identifiers sensio_distribution.security_checker, fos_user.listener.email_confirmation
Since PHP 5.6+, if function foo() is defined in the namespace Myapp\Utils\Bar and your code is in namespace Myapp, what is the correct way to import the foo() function? use function Myapp\Utils\Bar\foo;
[Bundles] Which method is executed once when bundle is loaded after cache is cleared? build()
[OOP] In PHP 5 you can use the ______ operator to ensure that an object is of a particular type. You can also use _______ in the function declaration. instanceof, type-hinting
[Controllers] How to perform a redirection on example.org in a controller? return $this->redirect('http://www.example.org')
[Templating] In Twig, a visitor priority varies between: -10 to 10
[Templating] In Twig, when compiling a node tree how can you change the default compiler on your $twig object $twig->setCompiler($compiler)
[OOP] To ensure that a given object has a particular set of methods, you must provide a method list in the form of an ________ and then attach it as part of your class using the ________ keyword. interface, implements
[OOP] What is the primary difference between a method declared as static and a normal method? Static methods don't have access to the self keyword, Static methods do not provide a reference to $this
[Data Formats] Which of the following will NOT instantiate a DateTime object with the current timestamp? $date = new DateTime(time());
[The Command Line] What is the command to check the syntax of a Twig template? php app/console twig:lint
[Validation] True or False ? We can also apply constraints on class getters with ``addPropertyConstrait()`` False
[Forms] Your Form class must extends ____ Symfony\Component\Form\AbstractType
[PHP] Variable names and function names are, respectively: case sensitive and case insensitive
[Templating] In class \Twig_Extension, which method returns list of functions? getFunctions()
[Web Features] During an HTTP authentication, how does one determine the username and password provided by the browser? $_SERVER['PHP_AUTH_USER'] $_SERVER['PHP_AUTH_PW']
[Security] Which of the following php.ini directives should be disabled to improve the outward security of your application? magic_quotes_gpc, allow_url_fopen, display_errors, register_globals
[Basics] Which of the following tags are an acceptable way to begin a PHP Code block? <SCRIPT LANGUAGE="php">, <?, <%
[HTTP] How to get the Content Type from Request ? $request->headers->get('Content-Type');, $request->headers->get('content_type');, $request->getContentType();, $request->headers->get('content-type');
[Web Features] One can ensure that headers can always be sent from a PHP script by doing what? Enable output buffering in PHP 5
What is the best way to ensure that a user-defined function is always passed an | function myfunction(stdClass $a) | | | | object as its single parameter? function myfunction(stdClass $a)
Show full summary Hide full summary

Similar

01 Types of Computers
mc_2871
Symfony Components Quiz
Alexandra Negrea
Explore EV3
Rebbecca Stanley
Flash messages
Elvis Moraes
RoboCup Challenge: Assessment
Rebbecca Stanley
Component Notes
Alexandra Negrea
Golf Putter
Ysabelle Glori
Symfony Components
Alexandra Negrea
Symfony Components Quiz 2
Adrian Caliman
Cookbook Quiz
Alexandra Negrea
Untitled
lb_