CompanyFlexContract.php 801B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Doctrine\Tests\Models\Company;
  3. /**
  4. * @Entity
  5. */
  6. class CompanyFlexContract extends CompanyContract
  7. {
  8. /**
  9. * @column(type="integer")
  10. * @var int
  11. */
  12. private $hoursWorked = 0;
  13. /**
  14. * @column(type="integer")
  15. * @var int
  16. */
  17. private $pricePerHour = 0;
  18. public function calculatePrice()
  19. {
  20. return $this->hoursWorked * $this->pricePerHour;
  21. }
  22. public function getHoursWorked()
  23. {
  24. return $this->hoursWorked;
  25. }
  26. public function setHoursWorked($hoursWorked)
  27. {
  28. $this->hoursWorked = $hoursWorked;
  29. }
  30. public function getPricePerHour()
  31. {
  32. return $this->pricePerHour;
  33. }
  34. public function setPricePerHour($pricePerHour)
  35. {
  36. $this->pricePerHour = $pricePerHour;
  37. }
  38. }