• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
YAML files, how does it work ?

#1
[eluser]Dagobert Renouf[/eluser]
hello guys hope you're doing fine ..

So here I'm creating my own CRUD library, cause I want to "get it" and to implement really specific fonctionnality.

I looked closely at rabbitforms and saw the use of YAML config files, I must say that looks awesome, but how do I use it ?

#2
[eluser]m4rw3r[/eluser]
If you want to use it for your own app, you must use a YAML parser. My YAYparser or spyc (or the PHP extension syck) can parse YAML into PHP arrays which you then can use in your app.

Mine works like this:
Code:
$this->load->helper('yayparser');
$yaml = file_get_contents('a_yaml_file.yaml');
$array = yayparser($yaml);
print_r($array);

#3
[eluser]Dagobert Renouf[/eluser]
thanks a lot m4rw3r that was very helpful.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.