rubellum/phpbag

phpbag is a container for key/value pairs.

v1.0.0 2017-12-09 01:23 UTC

This package is not auto-updated.

Last update: 2024-05-09 16:15:10 UTC


README

Build Status License: MIT

phpbag is a container for key/value pairs.

Install

Via Composer

$ composer require rubellum/phpbag

Requires PHP 5.5 or newer.

Usage

<?php

use Bag\Bag;

$bag = new Bag(['aaa' => 'bbb', 'ccc' => 'ddd']);

// array access
echo $bag['aaa']; // => 'bbb'

// property access
echo $bag->aaa; // => 'bbb'

Testing

$ ./vendor/bin/phpunit

License

The MIT License (MIT). Please see License File for more information.