Skip to content

CatfishPHP/Container

Repository files navigation

Container (Dependency Injection)

Logo

Software License Build Status

This package is compliant with PSR-1, PSR-2 and PSR-4. If you notice compliance oversights, please send a patch via pull request.

Install

Via Composer

$ composer require catfishphp/container

Requirements

The following versions of PHP are supported by this version.

  • PHP 7.1
  • PHP 7.2

Usage

<?php

$container = new Catfish\Container\Container;

// add a service to the container
$container->add('service', 'Acme\Service\SomeService');

// retrieve the service from the container
$service = $container->get('service');

var_dump($service instanceof Acme\Service\SomeService); // true

Testing

$ vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

About

Lightweight, fast, simple Dependency Injection Container

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages