hoochicken/parameter-bag

v1.2.1 2023-05-24 19:50 UTC

This package is auto-updated.

Last update: 2024-12-24 23:19:56 UTC


README

Administrate parameters in a collection, setters (setInt, setString ...) and getters (getInt, getString ...)

$numClients = 10;
$parameterBag = new ParameterBag();
$parameterBag->set('number_of_clients', $numClients);

vardump($parameterBag->getInt('number_of_clients'));
// (int)10

vardump($parameterBag->getString('number_of_clients'));
// (string)'10'

vardump($parameterBag->getBool('number_of_clients'));
// (bool)true