2017 © Pedro Peláez
 

extension containers

Simple containers package

image

ilyaplot/containers

Simple containers package

  • Monday, June 19, 2017
  • by ilyaplot
  • Repository
  • 1 Watchers
  • 0 Stars
  • 895 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 30 % Grown

The README.md

Containers extensions

GitHub tag Packagist Packagist GitHub issues, (*1)

Installation

The preferred way to install this extension is through composer. Just run, (*2)

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

or add, (*3)

"ilyaplot/containers": "*"

to the require section of your composer.json file., (*4)

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:

File: config.php:, (*5)

<?php 
  return ['hostname' => '127.0.0.1', 'username' => 'guest'];

Usage:, (*6)


// Example config.php: $config = new \ilyaplot\Config('config.php', ['password' => 'qwe123', 'username' => 'admin']); echo $config->hostname; // 127.0.0.1 echo $config->password; // qwe123 echo $config->username; // guest echo count($config); // 3 $config = new \ilyaplot\Config('config.php', [], ['required_param']); // throws ContainerException with message: Required param(s) "required_param" has not been set.

The Versions

19/06 2017

dev-master

9999999-dev

Simple containers package

  Sources   Download

MIT

The Requires

  • php >=5.6

 

container config helper

19/06 2017

0.0.5

0.0.5.0

Simple containers package

  Sources   Download

MIT

The Requires

  • php >=5.6

 

container config helper

19/06 2017

0.0.4

0.0.4.0

Simple containers package

  Sources   Download

MIT

The Requires

  • php >=5.6

 

container config helper

19/06 2017

0.0.3

0.0.3.0

Simple containers package

  Sources   Download

MIT

The Requires

  • php >=5.6

 

container config helper

19/06 2017

0.0.2

0.0.2.0

Simple containers package

  Sources   Download

MIT

The Requires

  • php >=5.6

 

container config helper

01/06 2017

0.0.1

0.0.1.0

Simpla containers package

  Sources   Download

MIT

The Requires

  • php >=7.0

 

container config helper