Quiz
Symfony Components Quiz
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (10)
1What functions can you call on an instance of \Symfony\Component\ClassLoader\ClassLoader, apart from the register() function?
- A$loader->addPrefix('Twig_', __DIR__.'/vendor/twig/twig/lib');
- B$loader->setUseIncludePath(true);
- C$loader->addPrefixes(array(
'Symfony' => __DIR__.'/../vendor/symfony/symfony/src',
'Monolog' => __DIR__.'/../vendor/monolog/monolog/src',
)); - D$loader->mapClass(Twig_', __DIR__.'/vendor/twig/twig/lib');
2What classes allow you to cache the mapping from a class to its containing file?
- AApcClassLoader
- BAppClassLoader
- CXDebugClassLoader
- DXcacheClassLoader
3How can you instantiate an ApcClassLoader?
- Anew ApcClassLoader($loader, sha1(__FILE__));
- Bnew ApcClassLoader($loader);
- Cnew ApcClassLoader(sha1(__FILE__), $loader);
- Dnew ApcClassLoader('../app/cache', $loader);
4Two class loaders can co-exist in the application?
- ATrue
- BFalse
5How many classes does the class loader component have?
- ALess than 10
- BAbout 20
- CMore than 40
6you can define a new file loader in Symfony, if the new loader class :
- Ais registered in yml as a service with the config.file_loader tag
- Bis registered with the DelagatingLoader
- Cimplements the LoaderInterface
- Dextends the abstract FileLoader class
7You should merge all your configuration files into one and use it as cache.
- ATrue
- BFalse
8What class in the Config Component helps you manage and check if the generate cache file containing all the configuration is valid and if not regenerate it?
- ACacheConfig
- BConfigurationCache
- CConfigLoaderCache
- DConfigCache
9In the context of a TreeBuilder, which of the following are valid node types?
- Astring
- Bscalar
- Carray
- Denum
- EserviceId
- Finteger
- Gboolean
- Hfloat
- Iparameter
- Jvariable
10Which of the following are valid ways to define a scalar node type? (to replace .... below)
$treeBuilder
->children()
.....
->end();- A->node('name', 'scalar')
- B->scalarNode('name')
- C->addScalarNode('name')
- D->nodeName('scalar')
Information
- Description
- Expert Symfony Quiz on Symfony Components Quiz, created by Alexandra Negrea on 19/05/2015.
- Author
- Alexandra Negrea
- Language
- English
- Views
- 285
- Tags
- Rating
- No ratings yet Rate this quiz