2017 © Pedro Peláez
 

library resolvable-callable

Resolvable callable factory allowing to execute callables using a Psr-11 container

image

ellipse/resolvable-callable

Resolvable callable factory allowing to execute callables using a Psr-11 container

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

The README.md

Resolvable callable

This package provides a resolvable callable factory allowing to execute callables using a Psr-11 container., (*1)

Require php >= 7.0, (*2)

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

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

Resolve a callable

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

<?php

namespace App;

use Some\Psr11Container;

use Ellipse\Resolvable\DefaultResolvableCallableFactory;

// The callable to resolve.
$callable = function (SomeClass $p1, int $p2 = 0, int $p3, string $p4 = 'p4') {

    // $p1 is the instance returned by $container->get(SomeClass::class);
    // $p2 value is 2
    // $p3 value is 3
    // $p3 value is 'p4'

    return 'result';

};

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

// Resolve the callable. $resolved value is 'result'.
$factory = new DefaultResolvableCallableFactory;

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

The Versions

23/02 2018

dev-master

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

Resolvable callable factory allowing to execute callables using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 callable-dependency-injection

23/02 2018

1.0.4

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

Resolvable callable factory allowing to execute callables using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 callable-dependency-injection

28/01 2018

1.0.3

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

Resolvable callable factory allowing to execute callables using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 callable-dependency-injection

14/01 2018

1.0.2

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

Resolvable callable factory allowing to execute callables using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 callable-dependency-injection

19/12 2017

1.0.1

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

Resolvable callable factory allowing to execute callables using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 callable-dependency-injection

05/12 2017

1.0.0

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

Resolvable callable factory allowing to execute callables using a Psr-11 container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar pmall

container dependency-injection psr-11 callable-dependency-injection