PHPackages                             ilyaplot/containers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ilyaplot/containers

AbandonedArchivedExtension[Utility &amp; Helpers](/categories/utility)

ilyaplot/containers
===================

Simple containers package

0.0.5(9y ago)02.5kMITPHPPHP &gt;=5.6

Since Jun 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ilyaplot/containers)[ Packagist](https://packagist.org/packages/ilyaplot/containers)[ RSS](/packages/ilyaplot-containers/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (6)Used By (0)

Containers extensions
=====================

[](#containers-extensions)

[![GitHub tag](https://camo.githubusercontent.com/57c3dac0af9e95d30d6e4a2340e96a56302ab098447811927ea41260de6ca1fe/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f696c7961706c6f742f636f6e7461696e6572732e737667)](https://github.com/ilyaplot/containers)[![Packagist](https://camo.githubusercontent.com/fbad9ae0b52a6f11522456db3e16aaef53d80e38f1414e77356599b7a66d5cab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696c7961706c6f742f796969322d6b65792d68656c7065722e737667)](https://packagist.org/packages/ilyaplot/containers)[![Packagist](https://camo.githubusercontent.com/f40ef580ac381b85fc950fc93c18e18f875214f645b7d8b884bc99db4ea60059/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696c7961706c6f742f796969322d6b65792d68656c7065722e737667)](https://packagist.org/packages/ilyaplot/containers)[![GitHub issues](https://camo.githubusercontent.com/b48d408904bf1190d239cf7c573f93a0fec6cf59d578b1c550442facc8aa81a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f696c7961706c6f742f796969322d6b65792d68656c7065722e737667)](https://github.com/ilyaplot/containers/issues)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Just run

```
php composer.phar require --prefer-dist ilyaplot/containers

```

or add

```
"ilyaplot/containers": "*"

```

to the require section of your `composer.json` file.

Usage Container exaple:
-----------------------

[](#usage-container-exaple)

```
$container = new \ilyaplot\Container(['value' => 100]);
$container->value1 = 200;

echo $container->value; // 100
echo $container->value1; // 200
echo $container['value1']; // 200

foreach ($container as $key=>$value) {
  echo $key . ':' . $value; // value:100 and value1:200
}

echo count($container); // 2

echo (string) $container; // {"value":100, "value2":200}
```

Usage Config exaple:
--------------------

[](#usage-config-exaple)

File: config.php:

```
