PHP code example of juststeveking / parameterbag
1. Go to this page and download the library: Download juststeveking/parameterbag library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
juststeveking / parameterbag example snippets
$parameters = ['foo' => 'bar'];
$bag = new \JustSteveKing\ParameterBag($parameters);
$query = \JustSteveKing\ParameterBag::fromString($request->getQuery());
class Config
{
protected ParameterBag $items;
private function __construct(array $items)
{
$this->items = new ParameterBag($items);
}
public static function create(array $items) : self
{
return new self($items);
}
}