Alexandra Negrea
Quiz por , criado more than 1 year ago

Expert Symfony Quiz sobre Symfony Components Quiz, criado por Alexandra Negrea em 19-05-2015.

243
0
0
Alexandra Negrea
Criado por Alexandra Negrea aproximadamente 9 anos atrás
Fechar

Symfony Components Quiz

Questão 1 de 10

1

What functions can you call on an instance of \Symfony\Component\ClassLoader\ClassLoader, apart from the register() function?

Selecione uma ou mais das seguintes:

  • $loader->addPrefix('Twig_', __DIR__.'/vendor/twig/twig/lib');

  • $loader->setUseIncludePath(true);

  • $loader->addPrefixes(array(
    'Symfony' => __DIR__.'/../vendor/symfony/symfony/src',
    'Monolog' => __DIR__.'/../vendor/monolog/monolog/src',
    ));

  • $loader->mapClass(Twig_', __DIR__.'/vendor/twig/twig/lib');

Explicação

Questão 2 de 10

1

What classes allow you to cache the mapping from a class to its containing file?

Selecione uma ou mais das seguintes:

  • ApcClassLoader

  • AppClassLoader

  • XDebugClassLoader

  • XcacheClassLoader

Explicação

Questão 3 de 10

1

How can you instantiate an ApcClassLoader?

Selecione uma das seguintes:

  • new ApcClassLoader($loader, sha1(__FILE__));

  • new ApcClassLoader($loader);

  • new ApcClassLoader(sha1(__FILE__), $loader);

  • new ApcClassLoader('../app/cache', $loader);

Explicação

Questão 4 de 10

1

Two class loaders can co-exist in the application?

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 5 de 10

1

How many classes does the class loader component have?

Selecione uma das seguintes:

  • Less than 10

  • About 20

  • More than 40

Explicação

Questão 6 de 10

1

you can define a new file loader in Symfony, if the new loader class :

Selecione uma ou mais das seguintes:

  • is registered in yml as a service with the config.file_loader tag

  • is registered with the DelagatingLoader

  • implements the LoaderInterface

  • extends the abstract FileLoader class

Explicação

Questão 7 de 10

1

You should merge all your configuration files into one and use it as cache.

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 8 de 10

1

What 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?

Selecione uma ou mais das seguintes:

  • CacheConfig

  • ConfigurationCache

  • ConfigLoaderCache

  • ConfigCache

Explicação

Questão 9 de 10

1

In the context of a TreeBuilder, which of the following are valid node types?

Selecione uma ou mais das seguintes:

  • string

  • scalar

  • array

  • enum

  • serviceId

  • integer

  • boolean

  • float

  • parameter

  • variable

Explicação

Questão 10 de 10

1

Which of the following are valid ways to define a scalar node type? (to replace .... below)

$treeBuilder
->children()
.....
->end();

Selecione uma ou mais das seguintes:

  • ->node('name', 'scalar')

  • ->scalarNode('name')

  • ->addScalarNode('name')

  • ->nodeName('scalar')

Explicação