aboutsummaryrefslogtreecommitdiffstats
path: root/yamlishwriter-php-v0.0.1/README
blob: bbd62041bce6662fae901a1e5a021b164c3305f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
YAMLishWriter.php Version 0.0.1

This is a simple implementation of a YAMLish writer for PHP. See

    http://testanything.org/wiki/index.php/YAMLish
  
for more information about YAMLish.

You can find the YAMLishWriter class in lib/yamlishwriter.php in this
distribution. YAMLishWriter is a self contained PHP class. To use it

    // Or wherever it is on your include path
    include('yamlishwriter.php');
    
    // And then later
    $writer = new YAMLishWriter;
    
    $data = array( 'got' => 1, 'expected' => 2 );
    $output = $writer->write($data);
    
The returned value is an array containing the lines of YAMLish.

This distribution contains a rudimentary test harness for which you'll
need Perl prove command. To run the tests edit Makefile to reflect the
location of your php command and then

    make test

Copyright 2007 Andy Armstrong, andy@hexten.net.

YAMLishWriter is distributed under Perl Artistic Licence:

    http://www.opensource.org/licenses/artistic-license.php