<?php
class Test
{
public function __construct(SomeInterface $someInterface){
$this->someInterface = $someInterface;
}
}
interface SomeInterface
{
public function foo($tmp){}
}
class Test
{
public function __construct(SomeInterface $someInterface)
{
$this->someInterface = $someInterface;
}
}
interface SomeInterface
{
public function foo($bar);
}
class SomeClass implements SomeInterface
{
public function foo($bar)
{
}
}
$a = new SomeClass("bar");
$b = new Test($a);