PHP Classes

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

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

Contents

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

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

/**
 * @inject.provider Acme\Providers\MailServiceProvider
 * @inject.provider Acme\Providers\HTTPServiceProvider
 */
class TestComponentH {
    public
$name;
    public
$mail;
    public
$http;
    public
$id;
   
   
/**
     * @inject.param $service mail
     * @inject.param $http http
     */
   
public function __construct($name, MailService $service, HTTPService $http, $id = 1) {
       
$this->name = $name;
       
$this->mail = $service;
       
$this->http = $http;
       
$this->id = $id;
    }
}