bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

commented

It looks like the documentation is missleading on this one.
Parse method does not assign hive variables, only retuns an array.

kuva
kuva

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;

kuva

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.