2017 © Pedro Peláez
 

library dependency-injection

Phug dependency injection engine

image

phug/dependency-injection

Phug dependency injection engine

  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 12 Versions
  • 23 % Grown

The README.md

Phug Dependency Injection

What is Phug Dependency Injection?

This project allow to provide helpers functions and values, to require them and to dump all required dependencies as a PHP array export., (*1)

Installation

Install via Composer, (*2)

composer require phug/dependency-injection

Usage

use Phug\DependencyInjection;

$dependencies = new DependencyInjection();
$dependencies->register('limit', 42);
$dependencies->provider('clock', static function () {
    return new Clock();
});

$dependencies->provider('expiration', ['clock', 'limit', static function (ClockInterface $clock, $limit) {
    return static function ($margin) use ($clock, $limit) {
        $delta = $limit - $margin;

        return $clock->now()->modify("$delta days");
    };
}]);

$expiration = $dependencies->call('expiration'); // return new DateTimeImmutable('now + 42 days')
$expiration = $dependencies->call('expiration', 20); // return new DateTimeImmutable('now + 22 days')

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure., (*3)

The Versions

06/04 2018

dev-master

9999999-dev http://phug-lang.com

Phug dependency injection engine

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

11/10 2017

1.3.2

1.3.2.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

25/09 2017

1.3.1

1.3.1.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

21/09 2017

1.3.0

1.3.0.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

22/07 2017

1.2.1

1.2.1.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

11/07 2017

1.2.0

1.2.0.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

07/07 2017

1.1.0

1.1.0.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

02/06 2017

1.0.2

1.0.2.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

14/03 2017

1.0.1

1.0.1.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

11/03 2017

1.0.0

1.0.0.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

23/02 2017

0.1.0

0.1.0.0 http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug

22/02 2017

dev-analysis-8nZGMg

dev-analysis-8nZGMg http://phug-lang.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Torben Koehn

template php html dependency-injection jade pug views render presentation phtml dialect phug