2017 © Pedro Peláez
 

library resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

image

ellipse/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  • Friday, February 23, 2018
  • by pmall
  • Repository
  • 1 Watchers
  • 0 Stars
  • 151 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Resolvable class

This package provides a resolvable class factory allowing to instantiate classes using a Psr-11 container., (*1)

Require php >= 7.0, (*2)

Installation composer require ellipse/resolvable-class, (*3)

Run tests ./vendor/bin/kahlan, (*4)

Resolve a class

This package provides a factory producing instances of Ellipse\Resolvable\ResolvableClass from class names. Those resolvable class instances can then be produced by calling the ->value() method with a Psr-11 container and an array of placeholder values., (*5)

<?php

namespace App;

class SomeClass
{
    public function __construct(SomeOtherClass $p1, int $p2 = 0, int $p3, string $p4 = 'p4')
    {
        // $p1 is the instance returned by $container->get(SomeOtherClass::class);
        // $p2 value is 2
        // $p3 value is 3
        // $p3 value is 'p4'
    }
}
<?php

namespace App;

use Some\Psr11Container;

use Ellipse\Resolvable\DefaultResolvableClassFactory;

// Some Psr-11 container.
$container = new Psr11Container;

// Resolve SomeClass. $resolved value is an instance of SomeClass.
$factory = new DefaultResolvableClassFactory;

$resolved = $factory(SomeClass::class)->value($container, [2, 3]);

The Versions

23/02 2018

dev-master

9999999-dev https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection

23/02 2018

1.0.7

1.0.7.0 https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection

28/01 2018

1.0.6

1.0.6.0 https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection

14/01 2018

1.0.5

1.0.5.0 https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection

14/01 2018

1.0.4

1.0.4.0 https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection

19/12 2017

1.0.3

1.0.3.0 https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection

06/12 2017

1.0.2

1.0.2.0 https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection

06/12 2017

1.0.1

1.0.1.0 https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection

05/12 2017

1.0.0

1.0.0.0 https://github.com/ellipsephp/resolvable-class

Resolvable class factory allowing to instantiate classes using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 class-dependency-injection