parse() method doesn't work
olaulau opened this issue · comments
Hi ;
executing the sample code from the parse method simply doesn't work :
<?php
require 'vendor/autoload.php';
$f3 = \Base::instance();
$f3->parse('framework=f3 , speed=fast , features=full');
echo $f3->get('PARAMS.framework'); // 'f3'
die;
gives no result.
It looks like the documentation is missleading on this one.
Parse method does not assign hive variables, only retuns an array.
I got the expected results like this:
<?php
require 'vendor/autoload.php';
$f3 = require('lib/base.php');
$f3->set('PARAMS', $f3->parse('framework=f3 , speed=fast , features=full'));
var_dump( $f3->get('PARAMS'));
die;
Hope this helped.
@Jonett I was expecting the behavior you have tested but had not time to check it. Feel free to send a Pull Request updating the documentation at f3com-data.