fenom / storage
Fenom extension: store data in fenom
Installs: 39 042
Dependents: 2
Suggesters: 0
Security: 0
Stars: 3
Watchers: 5
Forks: 1
Open Issues: 0
Requires
- php: >=5.4.8
Requires (Dev)
- fenom/fenom: 2.*
- phpunit/phpunit: *
- satooshi/php-coveralls: dev-master
README
Install
Use composer:
{ "require": { "fenom/storage": "1.*" } }
Setup
Add trait into your Fenom class:
class MyFenom extends \Fenom { use \Fenom\StorageTrait; }
Use
// set variable $fenom->assign("var_name", $value); // set variable by references $fenom->assignByRef("var_name", $value); // append variable to tail of array 'var_name' $fenom->append("var_name", $value); // prepend variable to head of array 'var_name' $fenom->prepend("var_name", $value); $vars = $fenom->getVars(); // set all variables as single array (rewrite previous array) $fenom->assignAll($vars); // remove all variables $fenom->resetVars(); $fenom->pipe($template_name, $callback); $fenom->fetch($template_name); $fenom->display($template_name);