Source for file Program.class.php

Documentation is available at Program.class.php

  1. <?php
  2.  
  3. class Program {
  4.  
  5. /**
  6. * @access private static
  7. * @var string
  8. */
  9. private $lID;
  10.  
  11. /**
  12. * @access private static
  13. * @var int
  14. */
  15. private $lStartTime;
  16.  
  17. /**
  18. * @access private static
  19. * @var int
  20. */
  21. private $lStopTime;
  22.  
  23. /**
  24. * @access private static
  25. * @var int
  26. */
  27. private $lDuration;
  28.  
  29. /**
  30. * @access private static
  31. * @var string
  32. */
  33. private $lTitle;
  34.  
  35. /**
  36. * @access private static
  37. * @var string
  38. */
  39. private $lDescription;
  40.  
  41. /**
  42. * @access private static
  43. * @var string
  44. */
  45. private $lLongDescription;
  46.  
  47. /**
  48. * Constructor. This creates a Program object.
  49. * @param int $pID
  50. * @param int $pStartTime
  51. * @param int $pDuration
  52. * @param string $pTitle
  53. * @param string $pDescription
  54. * @param string $pLongDescription
  55. * @return Program
  56. */
  57. public function __construct($pID,$pStartTime,$pDuration,$pTitle,$pDescription,$pLongDescription) {
  58. $this->lID = trim($pID);
  59. $this->lStartTime = trim($pStartTime);
  60. $this->lDuration = trim($pDuration);
  61. $this->lTitle = trim($pTitle);
  62. $this->lDescription = trim($pDescription);
  63. $this->lLongDescription = trim($pLongDescription);
  64.  
  65. if ($this->lDescription == "") {
  66. $this->lDescription = $this->lLongDescription;
  67. }
  68.  
  69. $this->setStopTime();
  70. }
  71.  
  72. /**
  73. * Set the stop time based in start time and duration
  74. */
  75. private function setStopTime() {
  76. $this->lStopTime = $this->lStartTime + $this->lDuration;
  77. }
  78.  
  79. /**
  80. * Get the program id.
  81. * @return int
  82. */
  83. public function getID() {
  84. return trim($this->lID);
  85. }
  86.  
  87. /**
  88. * Get the program start time in seconds.
  89. * @return array
  90. */
  91. public function getStartTime() {
  92. return trim($this->lStartTime);
  93. }
  94.  
  95. /**
  96. * Get the program stop time in seconds.
  97. * @return array
  98. */
  99. public function getStopTime() {
  100. return trim($this->lStopTime);
  101. }
  102.  
  103. /**
  104. * Get the program duration in seconds.
  105. * @return array
  106. */
  107. public function getDuration() {
  108. return trim($this->lDuration);
  109. }
  110.  
  111. /**
  112. * Get the program title.
  113. * @return array
  114. */
  115. public function getTitle() {
  116. return trim($this->lTitle);
  117. }
  118.  
  119. /**
  120. * Get the program description.
  121. * @return array
  122. */
  123. public function getDescription() {
  124. return trim($this->lDescription);
  125. }
  126.  
  127. /**
  128. * Get the program long description.
  129. * @return array
  130. */
  131. public function getLongDescription() {
  132. return trim($this->lLongDescription);
  133. }
  134. }
  135. ?>

Documentation generated on Tue, 24 Jun 2008 18:59:35 +0200 by phpDocumentor 1.3.0RC3