PHP Classes

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

Recommend this page to a friend!
  Classes of Emmanuel Antico  >  Injector  >  tests/classes/Acme/Providers/MailServiceProvider.php  >  Download  
File: tests/classes/Acme/Providers/MailServiceProvider.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: 8 years ago
Size: 312 bytes
 

Contents

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

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

class
MailServiceProvider implements ServiceProviderInterface {
    public function
register(Container $pimple) {
       
$pimple['mail'] = function ($c) {
            return new
MailService();
        };
    }
}
?>