|
Revision 89, 0.6 kB
(checked in by mikey, 2 years ago)
|
added integration tests using the existing examples
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
require_once dirname(__FILE__) . '/MyInterface.php'; |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
class MyCollector |
|---|
| 16 |
{ |
|---|
| 17 |
|
|---|
| 18 |
* hold bar |
|---|
| 19 |
* |
|---|
| 20 |
* @var array<MyInterface> |
|---|
| 21 |
*/ |
|---|
| 22 |
private $bar = array(); |
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
* set bar |
|---|
| 26 |
* |
|---|
| 27 |
* @param MyInterface $bar |
|---|
| 28 |
*/ |
|---|
| 29 |
public function addBar(MyInterface $bar) |
|---|
| 30 |
{ |
|---|
| 31 |
$this->bar[] = $bar; |
|---|
| 32 |
} |
|---|
| 33 |
|
|---|
| 34 |
public function getBar() |
|---|
| 35 |
{ |
|---|
| 36 |
return $this->bar; |
|---|
| 37 |
} |
|---|
| 38 |
} |
|---|
| 39 |
?> |
|---|