Alexandra Negrea
Quiz von , erstellt am more than 1 year ago

Expert Symfony Quiz am Symfony Components Quiz, erstellt von Alexandra Negrea am 19/05/2015.

243
0
0
Alexandra Negrea
Erstellt von Alexandra Negrea vor etwa 9 Jahre
Schließen

Symfony Components Quiz

Frage 1 von 10

1

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

Wähle eine oder mehr der folgenden:

  • $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');

Erklärung

Frage 2 von 10

1

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

Wähle eine oder mehr der folgenden:

  • ApcClassLoader

  • AppClassLoader

  • XDebugClassLoader

  • XcacheClassLoader

Erklärung

Frage 3 von 10

1

How can you instantiate an ApcClassLoader?

Wähle eine der folgenden:

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

  • new ApcClassLoader($loader);

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

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

Erklärung

Frage 4 von 10

1

Two class loaders can co-exist in the application?

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 5 von 10

1

How many classes does the class loader component have?

Wähle eine der folgenden:

  • Less than 10

  • About 20

  • More than 40

Erklärung

Frage 6 von 10

1

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

Wähle eine oder mehr der folgenden:

  • 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

Erklärung

Frage 7 von 10

1

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

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 8 von 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?

Wähle eine oder mehr der folgenden:

  • CacheConfig

  • ConfigurationCache

  • ConfigLoaderCache

  • ConfigCache

Erklärung

Frage 9 von 10

1

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

Wähle eine oder mehr der folgenden:

  • string

  • scalar

  • array

  • enum

  • serviceId

  • integer

  • boolean

  • float

  • parameter

  • variable

Erklärung

Frage 10 von 10

1

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

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

Wähle eine oder mehr der folgenden:

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

  • ->scalarNode('name')

  • ->addScalarNode('name')

  • ->nodeName('scalar')

Erklärung