Adefinir  1
SoundDesigner.php
Go to the documentation of this file.
1 <?php
2 namespace App\Models\Metiers;
3 
4 use app\Models\Employes;
5 
6 /* SoundDesigner
7  Classe représentant un employé travaillant en tant que Sound Designer
8 */
9 class SoundDesigner {
10 
11  // Nombre d'employés actuellement embauchés
12  private int $_nbEmployees = 0;
13 
14  // ====================================================================
15 
16  //Construct
17  public function _construct() {
18  $this->_nbEmployee = 0;
19  }
20 
28  public function workOnSoundScape( Employes $employees ) {
29  $employees->incrementActionResults( "soundScape", $this->_nbEmployees );
30  }
31 
39  public function buyLicense( Employes $employees ) {
40  $employees->incrementActionresults( "soundScape", $this->_nbEmployees );
41  }
42 
43 
51  public function hireSoundDesigner() : int {
52  $this->_nbEmployees += 1;
53  return $this->_nbEmployees;
54  }
55 
63  public function fireSoundDesigner() : int {
64  if ($this->_nbEmployees != 0){
65  $this->_nbEmployees = $this->_nbEmployees - 1;
66  }
67  return $this->_nbEmployees;
68  }
69 }
App\Models\Employes
Definition: Employes.php:24
App\Models\Metiers\SoundDesigner\fireSoundDesigner
fireSoundDesigner()
Definition: SoundDesigner.php:63
App\Models\Metiers\SoundDesigner\workOnSoundScape
workOnSoundScape(Employes $employees)
Definition: SoundDesigner.php:28
App\Models\Metiers\SoundDesigner\_construct
_construct()
Definition: SoundDesigner.php:17
App\Models\Metiers\SoundDesigner\hireSoundDesigner
hireSoundDesigner()
Definition: SoundDesigner.php:51
App\Models\Employes\incrementActionResults
incrementActionResults(string $varName, int $increment)
Definition: Employes.php:196
App\Models\Metiers
Definition: Developpeur.php:2
App\Models\Metiers\SoundDesigner\buyLicense
buyLicense(Employes $employees)
Definition: SoundDesigner.php:39
App\Models\Metiers\SoundDesigner
Definition: SoundDesigner.php:9