2017 © Pedro Peláez
 

library guardian

Dependency injector

image

phutureproof/guardian

Dependency injector

  • Saturday, June 24, 2017
  • by PhutureProof
  • Repository
  • 1 Watchers
  • 0 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Guardian

Build Status

Master, (*1)

Build Status, (*2)

Develop, (*3)

Build Status, (*4)

Code Climate, (*5)

Code Climate, (*6)

Basic Usage

Installation

via composer, (*7)

composer require phutureproof/guardian

or add this to your composer.json, (*8)

"require": {
  "phutureproof/guardian": "~3"
}

or manually grab the src folder and put the files where ever you want., (*9)

Usage

Create your dependencies and register functions to return instances of the objects in the container, (*10)

Guardian::register('dependency.name', function()
{
    return new Dependency();
});

Grab an instance of the dependency, (*11)

$instance = Guardian::make('dependency.name');

Register a singleton, (*12)

Guardian::register('singleton.dependency.name', function () {
    static $instance;
    if (is_null($instance)) {
        $instance = new Dependency();
    }
    return $instance;
});

The Versions

24/06 2017

dev-master

9999999-dev

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

29/04 2016

dev-develop

dev-develop

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

15/04 2016

3.0.0

3.0.0.0

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

15/04 2016

2.0.0

2.0.0.0

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

14/04 2016

1.0.3

1.0.3.0

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

13/04 2016

1.0.2

1.0.2.0

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

12/04 2016

1.0.1

1.0.1.0

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

12/04 2016

1.0.0

1.0.0.0

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

12/04 2016

0.1.0

0.1.0.0

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget

12/04 2016

0.1.1

0.1.1.0

Dependency injector

  Sources   Download

MIT

The Development Requires

by Dale Paget