Changeset 59141 for trunk/src/wp-includes/SimplePie/src/Credit.php
- Timestamp:
- 09/30/2024 10:48:16 PM (15 months ago)
- Location:
- trunk/src/wp-includes/SimplePie/src
- Files:
-
- 1 added
- 1 moved
-
. (added)
-
Credit.php (moved) (moved from trunk/src/wp-includes/SimplePie/Credit.php) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/src/Credit.php
r59140 r59141 1 1 <?php 2 2 3 /** 3 4 * SimplePie … … 6 7 * Takes the hard work out of managing a complete RSS/Atom solution. 7 8 * 8 * Copyright (c) 2004-20 16, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors9 * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors 9 10 * All rights reserved. 10 11 * … … 42 43 */ 43 44 45 namespace SimplePie; 46 44 47 /** 45 48 * Handles `<media:credit>` as defined in Media RSS 46 49 * 47 * Used by {@see SimplePie_Enclosure::get_credit()} and {@see SimplePie_Enclosure::get_credits()}50 * Used by {@see \SimplePie\Enclosure::get_credit()} and {@see \SimplePie\Enclosure::get_credits()} 48 51 * 49 * This class can be overloaded with {@see SimplePie::set_credit_class()}52 * This class can be overloaded with {@see \SimplePie\SimplePie::set_credit_class()} 50 53 * 51 54 * @package SimplePie 52 55 * @subpackage API 53 56 */ 54 class SimplePie_Credit57 class Credit 55 58 { 56 /**57 * Credited role58 *59 * @var string60 * @see get_role()61 */62 var$role;59 /** 60 * Credited role 61 * 62 * @var string 63 * @see get_role() 64 */ 65 public $role; 63 66 64 /**65 * Organizational scheme66 *67 * @var string68 * @see get_scheme()69 */70 var$scheme;67 /** 68 * Organizational scheme 69 * 70 * @var string 71 * @see get_scheme() 72 */ 73 public $scheme; 71 74 72 /**73 * Credited name74 *75 * @var string76 * @see get_name()77 */78 var$name;75 /** 76 * Credited name 77 * 78 * @var string 79 * @see get_name() 80 */ 81 public $name; 79 82 80 /**81 * Constructor, used to input the data82 *83 * For documentation on all the parameters, see the corresponding84 * properties and their accessors85 */86 public function __construct($role = null, $scheme = null, $name = null)87 {88 $this->role = $role;89 $this->scheme = $scheme;90 $this->name = $name;91 }83 /** 84 * Constructor, used to input the data 85 * 86 * For documentation on all the parameters, see the corresponding 87 * properties and their accessors 88 */ 89 public function __construct($role = null, $scheme = null, $name = null) 90 { 91 $this->role = $role; 92 $this->scheme = $scheme; 93 $this->name = $name; 94 } 92 95 93 /**94 * String-ified version95 *96 * @return string97 */98 public function __toString()99 {100 // There is no $this->data here101 return md5(serialize($this));102 }96 /** 97 * String-ified version 98 * 99 * @return string 100 */ 101 public function __toString() 102 { 103 // There is no $this->data here 104 return md5(serialize($this)); 105 } 103 106 104 /** 105 * Get the role of the person receiving credit 106 * 107 * @return string|null 108 */ 109 public function get_role() 110 { 111 if ($this->role !== null) 112 { 113 return $this->role; 114 } 107 /** 108 * Get the role of the person receiving credit 109 * 110 * @return string|null 111 */ 112 public function get_role() 113 { 114 if ($this->role !== null) { 115 return $this->role; 116 } 115 117 116 return null;117 }118 return null; 119 } 118 120 119 /** 120 * Get the organizational scheme 121 * 122 * @return string|null 123 */ 124 public function get_scheme() 125 { 126 if ($this->scheme !== null) 127 { 128 return $this->scheme; 129 } 121 /** 122 * Get the organizational scheme 123 * 124 * @return string|null 125 */ 126 public function get_scheme() 127 { 128 if ($this->scheme !== null) { 129 return $this->scheme; 130 } 130 131 131 return null;132 }132 return null; 133 } 133 134 134 /** 135 * Get the credited person/entity's name 136 * 137 * @return string|null 138 */ 139 public function get_name() 140 { 141 if ($this->name !== null) 142 { 143 return $this->name; 144 } 135 /** 136 * Get the credited person/entity's name 137 * 138 * @return string|null 139 */ 140 public function get_name() 141 { 142 if ($this->name !== null) { 143 return $this->name; 144 } 145 145 146 return null;147 }146 return null; 147 } 148 148 } 149 150 class_alias('SimplePie\Credit', 'SimplePie_Credit');
Note: See TracChangeset
for help on using the changeset viewer.