EmployeeService.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. class EmployeeService
  3. {
  4. public static $employee;
  5. /**
  6. * @param Employee $item
  7. * @return string
  8. */
  9. public function createEmployee(Employee $item)
  10. {
  11. $item->id = uniqid();
  12. self::$employee = $item;
  13. return $item->id;
  14. }
  15. }
  16. class Employee
  17. {
  18. /**
  19. * @var int
  20. */
  21. public $id;
  22. /**
  23. * @var string
  24. */
  25. public $firstname;
  26. /**
  27. * @var string
  28. */
  29. public $lastname;
  30. /**
  31. * @var string
  32. */
  33. public $title;
  34. /**
  35. * @var int
  36. */
  37. public $departmentid;
  38. /**
  39. * @var string
  40. */
  41. public $officephone;
  42. /**
  43. * @var string
  44. */
  45. public $cellphone;
  46. /**
  47. * @var string
  48. */
  49. public $email;
  50. /**
  51. * @var string
  52. */
  53. public $street;
  54. /**
  55. * @var string
  56. */
  57. public $city;
  58. /**
  59. * @var string
  60. */
  61. public $state;
  62. /**
  63. * @var string
  64. */
  65. public $zipcode;
  66. /**
  67. * @var string
  68. */
  69. public $office;
  70. /**
  71. * @var string
  72. */
  73. public $photofile;
  74. }