58 lines
911 B
PHP
58 lines
911 B
PHP
<?php
|
|
|
|
class Participant extends Personne
|
|
{
|
|
/**
|
|
* @var string $image Image
|
|
*/
|
|
protected $image;
|
|
|
|
/**
|
|
* @var Pays $pays
|
|
*/
|
|
protected $pays;
|
|
|
|
/**
|
|
* @param string $image
|
|
* @return Participant
|
|
*/
|
|
public function setImage($image)
|
|
{
|
|
if ('' === trim((string) $image)) {
|
|
throw new InvalidArgumentException('L\'image ne peut pas être vide.');
|
|
}
|
|
|
|
$this->image = $image;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return string|null
|
|
*/
|
|
public function getImage()
|
|
{
|
|
return $this->image;
|
|
}
|
|
|
|
/**
|
|
* @param Pays $pays
|
|
*/
|
|
public function setPays(Pays $pays)
|
|
{
|
|
$this->pays = $pays;
|
|
|
|
$this->pays->addParticipant($this);
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Pays
|
|
*/
|
|
public function getPays()
|
|
{
|
|
return $this->pays;
|
|
}
|
|
}
|