Symfony Components

Descrição

Expert Symfony FlashCards sobre Symfony Components, criado por Alexandra Negrea em 19-05-2015.
Alexandra Negrea
FlashCards por Alexandra Negrea, atualizado more than 1 year ago
Alexandra Negrea
Criado por Alexandra Negrea aproximadamente 9 anos atrás
35
0

Resumo de Recurso

Questão Responda
What does the ClassLoader Component do? * provide tools to load classes * cache class locations to improve perfermance
Which autoloaders does Symfony provide? * the PSR-0 class loader * the PSR-4 class loader (2.5) * MapClassLoader
How to enable an autoloader in your app/autoload.php file? require_once '../path/to/autoloaderClass'; $autoloader = new AutoloaderClass(); $autoloader->register();
Which classes in the ClassLoaderComponent allow you to cache the mapping from a class to its containing file? * ApcClassLoader * XCacheClassLoader
What method does the object that the ApcClassLoader or XcacheClassLoader wrap around need to implement? findFile()
$locator = new FileLocator($configDirectories); $yamlUserFiles = $locator->locate('users.yml', null, false); What do the parameters of the locate() function represent? - first: the name of the file to look for..; - second : the current path and when supplied, the locator will look in this directory first. - third: indicates whether or not the locator should return the first file it has found, or an array containing all matches.
How does Symfony find the right loader to load your files? When a resource (for instance an XML file) should be loaded, the LoaderResolver loops through this collection of loaders and returns the loader which supports this particular resource type. The DelegatingLoader makes use of the LoaderResolver.
In the dev env, how does the ConfigCache determine if it isFresh()? In debug mode, a .meta file will be created in the same directory as the cache file itself, containing the serialized resources, whose timestamps are used to determine if the cache is still fresh.
What does your bundle need to return in order to have a custom, valid configuration? A TreeBuilder instance should be returned from a custom Configuration class which implements the ConfigurationInterface.
What is Normalization used for in the configuration? The normalization process is used to remove some of the differences that result from different configuration formats, mainly the differences between YAML and XML. The separator used in keys is typically _ in YAML and - in XML. For example, auto_connect in YAML and auto-connect in XML. The normalization would make both of these auto_connect. The target key will not be altered if it's mixed like foo-bar_moo or if it already exists.

Semelhante

Symfony Components Quiz
Alexandra Negrea
Flash messages
Elvis Moraes
Component Notes
Alexandra Negrea
Symfony Certification
Nash Delos Santos
Symfony Components Quiz 2
Adrian Caliman
Cookbook Quiz
Alexandra Negrea
História da Arte: Impressionismo
carlanardesbis
Gerenciamento de Projetos - conceitos básicos
Luiz Fernando
Espécies de Atos Administrativos - NONEP
Silvana Dolinski
Fonética, ortografia e acentuação gráfica
GoConqr suporte .
Como ler um artigo científico?
raquel.schneider