PHP Classes

File: tests/classes/Acme/Components/TestComponentD.php

Recommend this page to a friend!
  Classes of Emmanuel Antico   Injector   tests/classes/Acme/Components/TestComponentD.php   Download  
File: tests/classes/Acme/Components/TestComponentD.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: 430 bytes
 

Contents

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

use
Acme\Services\MailService;
use
Acme\Services\HTTPService;

/**
 * @inject.strict
 */
class TestComponentD {
    public
$name;
    public
$mail;
    public
$http;
   
   
/**
     * @inject.param $service mail
     * @inject.param $http http
     */
   
public function __construct($name, MailService $service, HTTPService $http = null) {
       
$this->name = $name;
       
$this->mail = $service;
       
$this->http = $http;
    }
}

?>