SimplePie_Caption

Handles `` captions as defined in Media RSS.

Defined (1)

The class is defined in the following location(s).

/wp-includes/SimplePie/Caption.php  
  1. class SimplePie_Caption 
  2. /** 
  3. * Content type 
  4. * @var string 
  5. * @see get_type() 
  6. */ 
  7. var $type; 
  8.  
  9. /** 
  10. * Language 
  11. * @var string 
  12. * @see get_language() 
  13. */ 
  14. var $lang; 
  15.  
  16. /** 
  17. * Start time 
  18. * @var string 
  19. * @see get_starttime() 
  20. */ 
  21. var $startTime; 
  22.  
  23. /** 
  24. * End time 
  25. * @var string 
  26. * @see get_endtime() 
  27. */ 
  28. var $endTime; 
  29.  
  30. /** 
  31. * Caption text 
  32. * @var string 
  33. * @see get_text() 
  34. */ 
  35. var $text; 
  36.  
  37. /** 
  38. * Constructor, used to input the data 
  39. * For documentation on all the parameters, see the corresponding 
  40. * properties and their accessors 
  41. */ 
  42. public function __construct($type = null, $lang = null, $startTime = null, $endTime = null, $text = null) 
  43. $this->type = $type; 
  44. $this->lang = $lang; 
  45. $this->startTime = $startTime; 
  46. $this->endTime = $endTime; 
  47. $this->text = $text; 
  48.  
  49. /** 
  50. * String-ified version 
  51. * @return string 
  52. */ 
  53. public function __toString() 
  54. // There is no $this->data here 
  55. return md5(serialize($this)); 
  56.  
  57. /** 
  58. * Get the end time 
  59. * @return string|null Time in the format 'hh:mm:ss.SSS' 
  60. */ 
  61. public function get_endtime() 
  62. if ($this->endTime !== null) 
  63. return $this->endTime; 
  64. else 
  65. return null; 
  66.  
  67. /** 
  68. * Get the language 
  69. * @link http://tools.ietf.org/html/rfc3066 
  70. * @return string|null Language code as per RFC 3066 
  71. */ 
  72. public function get_language() 
  73. if ($this->lang !== null) 
  74. return $this->lang; 
  75. else 
  76. return null; 
  77.  
  78. /** 
  79. * Get the start time 
  80. * @return string|null Time in the format 'hh:mm:ss.SSS' 
  81. */ 
  82. public function get_starttime() 
  83. if ($this->startTime !== null) 
  84. return $this->startTime; 
  85. else 
  86. return null; 
  87.  
  88. /** 
  89. * Get the text of the caption 
  90. * @return string|null 
  91. */ 
  92. public function get_text() 
  93. if ($this->text !== null) 
  94. return $this->text; 
  95. else 
  96. return null; 
  97.  
  98. /** 
  99. * Get the content type (not MIME type) 
  100. * @return string|null Either 'text' or 'html' 
  101. */ 
  102. public function get_type() 
  103. if ($this->type !== null) 
  104. return $this->type; 
  105. else 
  106. return null;