Yaml
Definition from the official YAML website (http://www.yaml.org/): Yaml is an intuitive data-data serialization format that can be read by a computer, and is easily accessible to human beings, and is easily interacted with the scripting language. In other words, Yaml is a very simple XML-like Data description language, and syntax is much simpler than XML. He is very useful in describing data that can be converted to an array or hash, for example:
$house = Array (
Family + = Array (
Name = Doe,
Parents = Array (John, Jane),
Children = Array (Paul, Mark, Simone)
),
Address = = Array (
Number = 34,
Street = Main Street,
City = Nowheretown,
ZipCode = 12345
)
);
Parsing this yaml will automatically create the following PHP array:
House
Family
Name:doe
Parents:
-John
-Jane
Children:
-Paul
-Mark
-Simone
Address
Number:34
Street:main Street
City:nowheretown
zipcode:12345
In Yaml, the structure is represented by indentation, and successive items are represented by a minus sign "-", and the key/value inside the map structure is separated by a colon ":". Yaml is also useful for describing the abbreviated syntax of data in several lines of the same structure, which is included with [], and hash is included with {}. Therefore, the preceding YAML can be abbreviated as this:
House
Family: {name:doe, parents: [John, Jane], children: [Paul, Mark, Simone]}
Address: {number:34, Street:main Street, City:nowheretown, zipcode:12345}
YAML is the abbreviation for "yet another Markup Language (another Markup language)", "Yamel", or "Jammel". This format is approximately 2001, and so far has a YAML parser in multiple languages.
Detailed specifications for the YAML format can be found on the official YAML website http://www.yaml.org/.
As you can see, writing Yaml is much faster than XML (you do not need to close the tag or quotation marks) and is more powerful than the. ini file (the INI file does not support hierarchies). So Symfony chooses YAML as the preferred format for configuration information. You'll see a lot of yaml files in this book, but it's intuitive that you don't need to delve into YAML.
http://www.bkjia.com/PHPjc/531669.html www.bkjia.com true http://www.bkjia.com/PHPjc/531669.html techarticle Yaml is the definition of the official website of Yaml (http://www.yaml.org/): Yaml is an intuitive data-data serialization format that can be recognized by computers, and is easy to be read by humans, easy to ...