Adefinir  1
Psychologue.php
Go to the documentation of this file.
1 <?php
7 namespace App\Models\Metiers;
8 
10 
11 class Psychologue {
12 
13  // Contient le nombre d'employés actuellements embauchés
14  private int $_nbEmployees = 0;
15 
16  // ====================================================================
17 
18  // Constructeur
19  public function _construct() {
20  $this->_nbEmployees = 0;
21  }
22 
23 
31  public function workOnFocus( Employes $employees ) {
32  $employees->incrementActionResults( "focus", $this->_nbEmployees );
33  }
34 
35 
43  public function workOnAffordance(Employes $employees) {
44  $employees->incrementActionResults( "affordance", $this->_nbEmployees );
45  }
46 
47 
55  public function hirePsychologue() : int {
56  $this->_nbEmployees += 1;
57  return $this->_nbEmployees;
58  }
59 
67  public function firePsychologue() : int {
68  if ($this->_nbEmployees != 0){
69  $this->_nbEmployees = $this->_nbEmployees - 1;
70  }
71  return $this->_nbEmployees;
72  }
73 }
App\Models\Employes
Definition: Employes.php:24
App\Models\Metiers\Psychologue\workOnAffordance
workOnAffordance(Employes $employees)
Definition: Psychologue.php:43
App\Models\Employes\incrementActionResults
incrementActionResults(string $varName, int $increment)
Definition: Employes.php:196
App\Models\Metiers\Psychologue\_construct
_construct()
Definition: Psychologue.php:19
App\Models\Metiers\Psychologue\workOnFocus
workOnFocus(Employes $employees)
Definition: Psychologue.php:31
App\Models\Metiers
Definition: Developpeur.php:2
App\Models\Metiers\Psychologue\hirePsychologue
hirePsychologue()
Definition: Psychologue.php:55
App\Models\Metiers\Psychologue\firePsychologue
firePsychologue()
Definition: Psychologue.php:67
App\Models\Metiers\Psychologue
Definition: Psychologue.php:11