Yaml library |
[eluser]OliverHR[/eluser]
Wrapper (codeigniter library) and sfyaml. -ci_sfyaml.zip Tested with codeigniter versions: - 1.7.2 To load this library: Code: $this->load->library('yaml'); [h3]Method Summary[/h3] load Loads YAML into a PHP array. * @param string $input Path of YAML file or string containing YAML Code: $input = APPPATH . 'directory/filename.yml'; dump Dumps a PHP array to a YAML string. * @param integer $inline - The level where you switch to inline YAML Code: $this->yaml->dump($array, $inline); // return string Code: $array = array( Returns this YAML string representing the original PHP array: Code: one: write_yml Save a file with a YAML string Dumped from a PHP array. * @param string $file File name * @param array $array PHP array * @param string $path Optional specific directory path to save the file Code: $this->yaml->write_yml($file, $array, $path = ''); Code: $path = APPPATH.'fixtures'; Code: $file = APPPATH.'fixtures/temp.yml'; getSpecVersion Gets the YAML specification version to use. Code: $this->yaml->getSpecVersion() // return string setSpecVersion Sets the YAML specification version to use. Code: $this->yaml->setSpecVersion($version) // return void Note: Default Yaml specification version is 1.2 |
Messages In This Thread |
Yaml library - by El Forum - 09-25-2010, 08:40 PM
Yaml library - by El Forum - 09-25-2010, 09:20 PM
Yaml library - by El Forum - 09-26-2010, 12:24 AM
Yaml library - by El Forum - 09-27-2010, 03:02 PM
Yaml library - by El Forum - 09-28-2010, 08:17 AM
Yaml library - by El Forum - 10-22-2010, 08:23 AM
Yaml library - by El Forum - 10-22-2010, 01:25 PM
Yaml library - by El Forum - 07-30-2011, 07:17 PM
|