#
#    S P Y C
#      a simple php yaml class
#   v0.2(.4)
#
# author: [chris wanstrath, chris@ozmm.org]
# websites: [http://www.yaml.org, http://spyc.sourceforge.net/]
# license: [MIT License, http://www.opensource.org/licenses/mit-license.php]
# copyright: (c) 2005-2006 Chris Wanstrath
#
# spyc.yml - A file containing the YAML that Spyc understands.

# Mappings - with proper types
about: >
  From www.yaml.org:

  "YAML(tm) (rhymes with 'camel') is a human-friendly, cross language,
  Unicode based data serialization language designed around the common
  native data structures of agile programming languages. It is broadly
  useful for programming needs ranging from configuration files to
  Internet messaging to object persistence to data auditing. Together
  with the Unicode standard for characters, the YAML specification provides
  all the information necessary to understand YAML Version 1.1 and to
  creating programs that process YAML information.

  YAML(tm) is a balance of the following design goals:
    - YAML documents are very readable by humans.
    - YAML interacts well with scripting languages.
    - YAML uses host languages' native data structures.
    - YAML has a consistent information model.
    - YAML enables stream-based processing.
    - YAML is expressive and extensible.
    - YAML is easy to implement."

  YAML makes a lot of sense.  It's easy to use, easy to learn, and cool.
  As the lucky stiff named why once said, "YAML is a beacon of light."

  If you're new to YAML, may we suggest YAML In Five Minutes:
    - http://yaml.kwiki.org/?YamlInFiveMinutes

  If you don't have five minutes, realize that this README is a completely
  valid YAML document.  Dig in, load this or any YAML file into an array
  with Spyc and see how easy it is to translate friendly text into usable
  data.

  The purpose of Spyc is to provide a pure PHP alternative to Syck, a
  simple API for loading and dumping YAML documents, a YAML loader which
  understands a usable subset of the YAML spec, and to further spread
  the glory of YAML to the PHP masses.

  If you're at all hesitant ("usable subset of YAML?!"), navigate
  http://yaml.org/start.html.  Spyc completely understands the YAML
  document shown there, a document which has features way beyond the
  scope of what normal config files might require.  Try it for yourself,
  and then start enjoying the peace of mind YAML brings to your life.

meat and a few potatoes:
  - concept: Loading a YAML document into PHP
    brief: >
      $yaml will become an array of all the data in wicked.yaml
    code: |

      include('spyc.php');

      $yaml = Spyc::YAMLLoad('wicked.yaml');

  - concept: Loading a YAML string into PHP
    brief: >
      $array will look like this:
        array('A YAML','document in a','string')
    code: |

      include('spyc.php');

      $yaml  = '- A YAML\n- document in a\n- string.';
      $array = Spyc::YAMLLoad($yaml);

  - concept: Dumping a PHP array to YAML
    brief: >
      $yaml will become a string of a YAML document created from
      $array.
    code: |

      include('spyc.php');

      $array['name']  = 'chris';
      $array['sport'] = 'curbing';

      $yaml = Spyc::YAMLDump($array);


bestseller:
  page_title: my page title here
  page_description: my description here
  filename: product.php
  split: [product1.php, product2.php]
  action: product 
  product:
    form_id: test
    product_id: 25
    price: 297
    bonus: y
    source: yaml-test
    trial_amount: 1
    trial_time: 2-D
    regular_amount: 1
    regular_time: 2-M
    regular_installments: 4
	
oto.php: 
  one: Anyone's name, really.
  two: Anyone's name, really22.
  
Int: 13
True: true
False: false
Zero: 0
Null: NULL
Float: 5.34

# A sequence
- PHP Class
- Basic YAML Loader
- Very Basic YAML Dumper

# A sequence of a sequence
-
  - YAML is so easy to learn.
  - Your config files will never be the same.

# Sequence of mappings
-
  cpu: 1.5ghz
  ram: 1 gig
  os : os x 10.4.1

# Mapped sequence
domains:
  - yaml.org
  - php.net

# A sequence like this.
- program: Adium
  platform: OS X
  type: Chat Client

# A folded block as a mapped value
no time: >
  There isn't any time
  for your tricks!

  Do you understand?

# A literal block as a mapped value
some time: |
  There is nothing but time
  for your tricks.

# Crazy combinations
databases:
  - name: spartan
    notes:
      - Needs to be backed up
      - Needs to be normalized
    type: mysql

# You can be a bit tricky
"if: you'd": like

# Inline sequences
- [One, Two, Three, Four]

# Nested Inline Sequences
- [One, [Two, And, Three], Four, Five]

# Nested Nested Inline Sequences
- [This, [Is, Getting, [Ridiculous, Guys]], Seriously, [Show, Mercy]]

# Inline mappings
- {name: chris, age: young, brand: lucky strike}

# Nested inline mappings
- {name: mark, age: older than chris, brand: [marlboro, lucky strike]}

# References -- they're shaky, but functional
dynamic languages: &DLANGS
  - Perl
  - Python
  - PHP
  - Ruby
compiled languages: &CLANGS
  - C/C++
  - Java
all languages:
  - *DLANGS
  - *CLANGS

# Added in .2.2: Escaped quotes
- you know, this shouldn't work.  but it does.
- 'that''s my value.'
- 'again, that\'s my value.'
- "here's to \"quotes\", boss."

# added in .2.3
- {name: "Foo, Bar's", age: 20}

# Added in .2.4: bug [ 1418193 ] Quote Values in Nested Arrays
- [a, ['1', "2"], b]

# Added in .2.4: malformed YAML
all
  javascripts:     [dom1.js, dom.js]

# Added in .2
1040: Ooo, a numeric key! # And working comments? Wow!