mirror of https://github.com/flightphp/core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
452 B
24 lines
452 B
10 months ago
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace tests\classes;
|
||
|
|
||
|
use flight\util\Collection;
|
||
|
|
||
|
class Container
|
||
|
{
|
||
|
protected Collection $collection;
|
||
|
|
||
|
public function __construct(Collection $collection)
|
||
|
{
|
||
|
$this->collection = $collection;
|
||
|
}
|
||
|
|
||
|
public function testTheContainer()
|
||
|
{
|
||
|
$this->collection->whatever = 'yay!';
|
||
|
echo 'yay! I injected a collection, and it has ' . $this->collection->count() . ' items';
|
||
|
}
|
||
|
}
|