PHP Value Object


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. class NationalForest
  3. {
  4. /**
  5. * @var int
  6. */
  7. public $id = 0;
  8.  
  9. /**
  10. * @var string
  11. */
  12. public $state = "";
  13.  
  14. /**
  15. * @var int
  16. */
  17. public $area = 0;
  18.  
  19. /**
  20. * @var DateTime
  21. */
  22. public $established = "";
  23.  
  24. /**
  25. * @var string
  26. */
  27. public $closest_city = "";
  28.  
  29. /**
  30. * @var string
  31. */
  32. public $name = "";
  33.  
  34. public function __construct()
  35. {
  36. $this->id = 0;
  37. $this->state = "";
  38. $this->area = 0;
  39. $this->established = date("c");
  40. $this->closest_city = "";
  41. $this->name = "";
  42. }
  43. }
  44. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.