2017 © Pedro Peláez
 

library container

The Analyze PHP Framework Container

image

analyzephp/container

The Analyze PHP Framework Container

  • Tuesday, July 24, 2018
  • by SparksCoding
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Analyze PHP Container

This is the default container used in the Analyze PHP Framework. It is PSR-11 compatable., (*1)

Installation

Requirements

PHP >= 7.0.0, (*2)

Via Composer

Installation via Composer is the recommended method of installation., (*3)

Basic Usage

<?php

use Analyze\Container\Container;

// Create a new Container instance
$container = new Container;

// Add via Factory
$this->addFactory('AwesomePackage', function() {
    return new Some\Awesome\Package;
});

// Add via Constructor
$this->addClass('AwesomePackage', Some\Awesome\Package::class);

// Add via Setter
$this->addSetter('AwesomePackage', 'Some\Awesome\Package', [
    'setName' => 'Bob'
]);

// Return a new instance
$awesome = $container->get('AwesomePackage');

The Versions

24/07 2018

dev-master

9999999-dev

The Analyze PHP Framework Container

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Sparks