mustangostang / spyc

A simple YAML loader/dumper class for PHP
MIT License
707 stars 207 forks source link

need help with Grouping #33

Closed spar closed 10 years ago

spar commented 10 years ago

Hey man,

First of all, great project. Love and i use it a lot.

I was wondering if you can help me on how i can group fields using your project.

i show some constants like private $_containsGroupAnchor = false; private $_containsGroupAlias = false;

how do i use it?

Thanks Sandeep

ryanuber commented 10 years ago

@sandeepparekh9, which groupings are you referring to? The yaml spec doesn't seem to have any indication to supporting any groupings.

The variables you are referencing are not accessible directly. They keep track of certain internal conditions while parsing YAML text. Spyc is a completely stand-alone YAML implementation, so you will see lots of code that is completely inaccessible from any external-facing functions.

spar commented 10 years ago

I see. Got it.

What i meant by grouping was that if i wanted to group certain fields into an array / object , how would i do that if possible via spyc.

Example:

NGINX_VHOSTS:

Thanks.