PHP Classes

File: tests/classes/Acme/Providers/HTTPServiceProvider.php

Recommend this page to a friend!
  Classes of Emmanuel Antico   Injector   tests/classes/Acme/Providers/HTTPServiceProvider.php   Download  
File: tests/classes/Acme/Providers/HTTPServiceProvider.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Injector
Inject dependencies defined in annotation comments
Author: By
Last change:
Date: 9 years ago
Size: 312 bytes
 

Contents

Class file image Download
<?php
namespace Acme\Providers;

use
Pimple\ServiceProviderInterface;
use
Pimple\Container;
use
Acme\Services\HTTPService;

class
HTTPServiceProvider implements ServiceProviderInterface {
    public function
register(Container $pimple) {
       
$pimple['http'] = function ($c) {
            return new
HTTPService();
        };
    }
}
?>