GoConqr has a new look! Let us know what you think.

Quiz

Symfony Components Quiz

Alexandra Negrea 10 questions

Take the quiz

Questions in this quiz (10)

  1. 1What functions can you call on an instance of \Symfony\Component\ClassLoader\ClassLoader, apart from the register() function?
    1. A$loader->addPrefix('Twig_', __DIR__.'/vendor/twig/twig/lib');
    2. B$loader->setUseIncludePath(true);
    3. C$loader->addPrefixes(array(
      'Symfony' => __DIR__.'/../vendor/symfony/symfony/src',
      'Monolog' => __DIR__.'/../vendor/monolog/monolog/src',
      ));
    4. D$loader->mapClass(Twig_', __DIR__.'/vendor/twig/twig/lib');
  2. 2What classes allow you to cache the mapping from a class to its containing file?
    1. AApcClassLoader
    2. BAppClassLoader
    3. CXDebugClassLoader
    4. DXcacheClassLoader
  3. 3How can you instantiate an ApcClassLoader?
    1. Anew ApcClassLoader($loader, sha1(__FILE__));
    2. Bnew ApcClassLoader($loader);
    3. Cnew ApcClassLoader(sha1(__FILE__), $loader);
    4. Dnew ApcClassLoader('../app/cache', $loader);
  4. 4Two class loaders can co-exist in the application?
    1. ATrue
    2. BFalse
  5. 5How many classes does the class loader component have?
    1. ALess than 10
    2. BAbout 20
    3. CMore than 40
  6. 6you can define a new file loader in Symfony, if the new loader class :
    1. Ais registered in yml as a service with the config.file_loader tag
    2. Bis registered with the DelagatingLoader
    3. Cimplements the LoaderInterface
    4. Dextends the abstract FileLoader class
  7. 7You should merge all your configuration files into one and use it as cache.
    1. ATrue
    2. BFalse
  8. 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?
    1. ACacheConfig
    2. BConfigurationCache
    3. CConfigLoaderCache
    4. DConfigCache
  9. 9In the context of a TreeBuilder, which of the following are valid node types?
    1. Astring
    2. Bscalar
    3. Carray
    4. Denum
    5. EserviceId
    6. Finteger
    7. Gboolean
    8. Hfloat
    9. Iparameter
    10. Jvariable
  10. 10Which of the following are valid ways to define a scalar node type? (to replace .... below)

    $treeBuilder
    ->children()
    .....
    ->end();
    1. A->node('name', 'scalar')
    2. B->scalarNode('name')
    3. C->addScalarNode('name')
    4. D->nodeName('scalar')

Information

Description
Expert Symfony Quiz on Symfony Components Quiz, created by Alexandra Negrea on 19/05/2015.
Language
English
Views
285
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?