2017 © Pedro Peláez
 

library phpcore-viewparam

Data organization for the rendering engine

image

vdeapps/phpcore-viewparam

Data organization for the rendering engine

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

phpcore-viewparam

Data organization for the rendering engine., (*1)

This use the vdeapps/phpcore-chained-array, (*2)

PHP usage

$vp = ViewParam::getInstance();

// To set values
$vp->addvp(VP_LIST, 'myList', $myDataArray);
$vp->addvp(VP_DATA, 'keyname', $myDataArray);
$vp->addvp(VP_DATA, 'stringvalue', 'Hello World');
$vp->addvp(VP_DEBUG, 'forDebug', $myDataArray);
$vp->addvp(VP_FILTERS, 'form', $myDataArray);
$vp->addvp(VP_INFO, 'General', $myDataArray);
$vp->addvp(VP_MAILS, 'mailParams', $myDataArray);
$vp->addvp(VP_RESPONSE, 'responseData', $myDataArray);
$vp->addvp('customkey', 'key', 'val');


// To get values
$vp->getvp(VP_LIST, 'myList');  //Return a ChainedArray
$vp->getvp(VP_DATA, 'keyname'); //Return a ChainedArray
$vp->getvp(VP_DEBUG, 'forDebug'); //Return a ChainedArray
$vp->getvp(VP_FILTERS, 'form'); //Return a ChainedArray
$vp->getvp(VP_INFO, 'General'); //Return a ChainedArray
$vp->getvp(VP_MAILS, 'mailParams'); //Return a ChainedArray
$vp->getvp(VP_RESPONSE, 'responseData'); //Return a ChainedArray
$vp->getvp('customkey', 'key'); //Return a string

TWIG usage

For use with twig, send the $vp() parameter to the render. Thus you can use like a standard array, (*3)

{{ list.myList }}
{{ data.keyname }}
{{ data.stringvalue }}
{{ debug.forDebug }}
{{ filters.form }}
{{ info.General }}
{{ mails.mailParams }}
{{ response.responseData }}
{{ customkey.key }}

The Versions

19/07 2018

dev-master

9999999-dev https://github.com/vdeapps/phpcore-viewparam

Data organization for the rendering engine

  Sources   Download

MIT

The Requires

 

The Development Requires

library render vdeapps

19/07 2018

v2.0.0

2.0.0.0 https://github.com/vdeapps/phpcore-viewparam

Data organization for the rendering engine

  Sources   Download

MIT

The Requires

 

The Development Requires

library render vdeapps

06/06 2018

v1.0.2

1.0.2.0 https://github.com/vdeapps/phpcore-viewparam

Data organization for the rendering engine

  Sources   Download

MIT

The Requires

 

The Development Requires

library render vdeapps

05/06 2018

v1.0.1

1.0.1.0 https://github.com/vdeapps/phpcore-viewparam

Data organization for the rendering engine

  Sources   Download

MIT

The Requires

 

The Development Requires

library render vdeapps

05/06 2018

v1.0.0

1.0.0.0 https://github.com/vdeapps/phpcore-viewparam

Data organization for the rendering engine

  Sources   Download

MIT

The Requires

 

The Development Requires

library render vdeapps