railken/bag

There is no license information available for the latest version (v2.0.1) of this package.

Maintainers

Details

github.com/railken/bag

Source

Issues

Installs: 83 810

Dependents: 26

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/railken/bag

v2.0.1 2025-04-14 15:15 UTC

This package is auto-updated.

Last update: 2025-09-14 16:10:28 UTC


README

Build Status Maintainability Test Coverage Style CI License Latest stable PHP

Inspired by ParameterBag I decided to create a new repository that contains a similiar class with a few adjustments.

Requirements

PHP 8.1 or later.

Composer

You can install it via Composer by typing the following command:

composer require railken/bag

Getting Started

Simple usage looks like:

use Railken\Bag;

# Initialization
$bag = new Bag();
$bag = new Bag(['foo' => '1']);

# Setting
$bag->set('foo', 1)->set('fee', 2);

# Getting
$bag->foo; #1
$bag->get('bar', 3); #3
 

License

Open-source software licensed under the MIT license.