<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\StagiaireRepository")
*/
class Stagiaire
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $firstName;
/**
* @ORM\Column(type="string", length=255)
*/
private $lastName;
/**
* @ORM\Column(type="string", length=255)
*/
private $age;
/**
* @ORM\Column(type="string", length=255)
*/
private $sexe;
/**
* @ORM\Column(type="string", length=255)
*/
private $email;
/**
* @ORM\Column(type="string", length=255)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255)
*/
private $skill;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Classe", mappedBy="stagiares")
*/
private $classes;
public function __construct()
{
$this->classes = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(string $firstName): self
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
public function getAge(): ?string
{
return $this->age;
}
public function setAge(string $age): self
{
$this->age = $age;
return $this;
}
public function getSexe(): ?string
{
return $this->sexe;
}
public function setSexe(string $sexe): self
{
$this->sexe = $sexe;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getSkill(): ?string
{
return $this->skill;
}
public function setSkill(string $skill): self
{
$this->skill = $skill;
return $this;
}
// public function __toString()
// {
// return $this->getClasse();
// }
/**
* @return Collection|Classe[]
*/
public function getClasses(): Collection
{
return $this->classes;
}
public function setClasses(?Classe $classe): self
{
$this->classe = $classe;
return $this;
}
public function addClass(Classe $class): self
{
if (!$this->classes->contains($class)) {
$this->classes[] = $class;
$class->addStagiare($this);
}
return $this;
}
public function removeClass(Classe $class): self
{
if ($this->classes->contains($class)) {
$this->classes->removeElement($class);
$class->removeStagiare($this);
}
return $this;
}
}