programming faqs interview questions tech technical educational freshers guide preparation interviews hr telephonic
try another color:
try another fontsize: 60% 70% 80% 90%
Programming FAQs

How to setup the configuration in symfony using yaml?

Average: 5 (1 vote)

we can write the

we can write the configuration settings using yaml file

Rules to write yaml file

1) don't use tabs for indentation , symfony can not understand file with tabs, use spaces for indentation

2) enclose non standard strings in Single Quotes

3) define multi line strings with special characters '>' and '|'

4) define the arrays with square brackets and dashes

eg:
Programming: [C, c++, java, php, perl]

using dashes

Programming:
- c
- c++
- java
- php
- perl
5) define the associative arrays or hases with curly brackets and always use a space between the key and value.

eg: programming: { nj: 08536, CA: 09534, WA: 0934 }

or

programming:
nj: 08536
ca: 09534
wa: 0934

6) for boolean values use on,true or 1 for positive values
off,false,0 for negative values

true_values: [ on, 1, true ]
false_values: [ off, 0, false ]

7) comments should start with #

for more information about symfoy and yaml read this tutorial

http://www.symfony-project.org/book/1_0/05-Configuring-Symfony