2017 © Pedro Peláez
 

library container

Container for PHP

image

yep/container

Container for PHP

  • Sunday, January 7, 2018
  • by yep
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status Scrutinizer Code Quality Scrutinizer Code Coverage Latest Stable Version Total Downloads License, (*1)

Dsn

Packagist

Dsn is available on Packagist.org, just add the dependency to your composer.json., (*2)

{
  "require" : {
    "yep/container": "dev-master"
  }
}

Usage

<?php
use Yep\Container\ContainerInterface;
use Yep\Container\ContainerTrait;

class Container implements ContainerInterface
{
    use ContainerTrait;

    public function someServiceFactory()
    {
        return new SomeService($this->getParameter('someParameter'));
    }
}

$container = new Container(['someParameter' => 'foo']);
$someService = $container->getService('someService');

or, (*3)

<?php
class Container extends Yep\Container\Container
{
    public function someServiceFactory()
    {
        return new SomeService($this->getParameter('someParameter'));
    }
}

$container = new Container(['someParameter' => 'foo']);
$someService = $container->getService('someService');

The Versions

07/01 2018

dev-master

9999999-dev https://github.com/YepFoundation/container

Container for PHP

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

  • php >=5.6

 

The Development Requires

container