SimplePie_Category

Manages all category-related data.

Defined (1)

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

/wp-includes/SimplePie/Category.php  
  1. class SimplePie_Category 
  2. /** 
  3. * Category identifier 
  4. * @var string 
  5. * @see get_term 
  6. */ 
  7. var $term; 
  8.  
  9. /** 
  10. * Categorization scheme identifier 
  11. * @var string 
  12. * @see get_scheme() 
  13. */ 
  14. var $scheme; 
  15.  
  16. /** 
  17. * Human readable label 
  18. * @var string 
  19. * @see get_label() 
  20. */ 
  21. var $label; 
  22.  
  23. /** 
  24. * Constructor, used to input the data 
  25. * @param string $term 
  26. * @param string $scheme 
  27. * @param string $label 
  28. */ 
  29. public function __construct($term = null, $scheme = null, $label = null) 
  30. $this->term = $term; 
  31. $this->scheme = $scheme; 
  32. $this->label = $label; 
  33.  
  34. /** 
  35. * String-ified version 
  36. * @return string 
  37. */ 
  38. public function __toString() 
  39. // There is no $this->data here 
  40. return md5(serialize($this)); 
  41.  
  42. /** 
  43. * Get the category identifier 
  44. * @return string|null 
  45. */ 
  46. public function get_term() 
  47. if ($this->term !== null) 
  48. return $this->term; 
  49. else 
  50. return null; 
  51.  
  52. /** 
  53. * Get the categorization scheme identifier 
  54. * @return string|null 
  55. */ 
  56. public function get_scheme() 
  57. if ($this->scheme !== null) 
  58. return $this->scheme; 
  59. else 
  60. return null; 
  61.  
  62. /** 
  63. * Get the human readable label 
  64. * @return string|null 
  65. */ 
  66. public function get_label() 
  67. if ($this->label !== null) 
  68. return $this->label; 
  69. else 
  70. return $this->get_term();