- 2008 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2007 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2006 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2005 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2004 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2003 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2002 : 01 02 03 04 05 06 07 08 09 10 11 12
2006-03-11
spyc - PHPでYAMLを扱えるライブラリ
- 用途
オプションファイルを YAML で記述.
オプションファイルの編集に PHP を利用.
- YAML から 配列に
- 配列 から YAML に
- Reference
SourceForge - spyc: a simple php yaml class
http://spyc.sourceforge.net/
cl.pocari.org - 人間にとって読みやすいデータ直列化フォーマット YAML Ain't Markup Language
http://cl.pocari.org/2005-10-20-1.html
NamingSense::TokuLog! - YAMLでヴァリデーションの条件を書く
http://d.hatena.ne.jp/tokuhirom/20060310/1142007501
- via
phpspot開発日誌 - PHP用YAMLクラス : spyc
http://phpspot.org/blog/archives/2006/02/phpyaml_spyc.html
オプションファイルを YAML で記述.
オプションファイルの編集に PHP を利用.
- YAML から 配列に
include('spyc.php'); $array = Spyc::YAMLLoad('yamlfile.yml'); print_r($array);
- 配列 から YAML に
include('spyc.php'); $array[] = 'Sequence item'; $array['The Key'] = 'Mapped value'; $array[] = array('A sequence','of a sequence'); $array[] = array('first' => 'A sequence','second' => 'of mapped values'); $array['Mapped'] = array('A sequence','which is mapped'); $array['A Note'] = 'What if your text is too long?'; $array['Another Note'] = 'If that is the case, the dumper will probably fold your text by using a block. Kinda like this.'; $array['The trick?'] = 'The trick is that we overrode the default indent, 2, to 4 and the default wordwrap, 40, to 60.'; $array['Old Dog'] = "And if you want\n to preserve line breaks, \ngo ahead!"; $yaml = Spyc::YAMLDump($array,4,60); print_r($yaml);
- Reference
SourceForge - spyc: a simple php yaml class
http://spyc.sourceforge.net/
cl.pocari.org - 人間にとって読みやすいデータ直列化フォーマット YAML Ain't Markup Language
http://cl.pocari.org/2005-10-20-1.html
NamingSense::TokuLog! - YAMLでヴァリデーションの条件を書く
http://d.hatena.ne.jp/tokuhirom/20060310/1142007501
- via
phpspot開発日誌 - PHP用YAMLクラス : spyc
http://phpspot.org/blog/archives/2006/02/phpyaml_spyc.html
- 2008 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2007 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2006 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2005 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2004 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2003 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2002 : 01 02 03 04 05 06 07 08 09 10 11 12
2006-03 /