2016-05-24 14:10:39 +02:00
|
|
|
<?php namespace Moserware\Skills;
|
2010-08-28 22:05:41 -04:00
|
|
|
|
|
|
|
class Team extends RatingContainer
|
|
|
|
{
|
2016-05-24 16:31:21 +02:00
|
|
|
public function __construct(Player $player = null, Rating $rating = null)
|
2010-09-25 12:50:33 -04:00
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
|
2016-05-24 14:10:39 +02:00
|
|
|
if(!is_null($player))
|
2010-08-28 22:05:41 -04:00
|
|
|
{
|
|
|
|
$this->addPlayer($player, $rating);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-24 16:31:21 +02:00
|
|
|
public function addPlayer(Player $player, Rating $rating)
|
2010-08-28 22:05:41 -04:00
|
|
|
{
|
|
|
|
$this->setRating($player, $rating);
|
|
|
|
return $this;
|
2010-10-02 21:15:47 -04:00
|
|
|
}
|
2016-05-24 14:10:39 +02:00
|
|
|
}
|