Changeset 59141 for trunk/src/wp-includes/SimplePie/src/Author.php
- Timestamp:
- 09/30/2024 10:48:16 PM (16 months ago)
- Location:
- trunk/src/wp-includes/SimplePie/src
- Files:
-
- 1 added
- 1 moved
-
. (added)
-
Author.php (moved) (moved from trunk/src/wp-includes/SimplePie/Author.php) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/src/Author.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 * Manages all author-related data 46 49 * 47 * Used by {@see SimplePie_Item::get_author()} and {@see SimplePie::get_authors()}50 * Used by {@see Item::get_author()} and {@see SimplePie::get_authors()} 48 51 * 49 52 * This class can be overloaded with {@see SimplePie::set_author_class()} … … 52 55 * @subpackage API 53 56 */ 54 class SimplePie_Author57 class Author 55 58 { 56 /**57 * Author's name58 *59 * @var string60 * @see get_name()61 */62 var$name;59 /** 60 * Author's name 61 * 62 * @var string 63 * @see get_name() 64 */ 65 public $name; 63 66 64 /**65 * Author's link66 *67 * @var string68 * @see get_link()69 */70 var$link;67 /** 68 * Author's link 69 * 70 * @var string 71 * @see get_link() 72 */ 73 public $link; 71 74 72 /**73 * Author's email address74 *75 * @var string76 * @see get_email()77 */78 var$email;75 /** 76 * Author's email address 77 * 78 * @var string 79 * @see get_email() 80 */ 81 public $email; 79 82 80 /**81 * Constructor, used to input the data82 *83 * @param string $name84 * @param string $link85 * @param string $email86 */87 public function __construct($name = null, $link = null, $email = null)88 {89 $this->name = $name;90 $this->link = $link;91 $this->email = $email;92 }83 /** 84 * Constructor, used to input the data 85 * 86 * @param string $name 87 * @param string $link 88 * @param string $email 89 */ 90 public function __construct($name = null, $link = null, $email = null) 91 { 92 $this->name = $name; 93 $this->link = $link; 94 $this->email = $email; 95 } 93 96 94 /**95 * String-ified version96 *97 * @return string98 */99 public function __toString()100 {101 // There is no $this->data here102 return md5(serialize($this));103 }97 /** 98 * String-ified version 99 * 100 * @return string 101 */ 102 public function __toString() 103 { 104 // There is no $this->data here 105 return md5(serialize($this)); 106 } 104 107 105 /** 106 * Author's name 107 * 108 * @return string|null 109 */ 110 public function get_name() 111 { 112 if ($this->name !== null) 113 { 114 return $this->name; 115 } 108 /** 109 * Author's name 110 * 111 * @return string|null 112 */ 113 public function get_name() 114 { 115 if ($this->name !== null) { 116 return $this->name; 117 } 116 118 117 return null;118 }119 return null; 120 } 119 121 120 /** 121 * Author's link 122 * 123 * @return string|null 124 */ 125 public function get_link() 126 { 127 if ($this->link !== null) 128 { 129 return $this->link; 130 } 122 /** 123 * Author's link 124 * 125 * @return string|null 126 */ 127 public function get_link() 128 { 129 if ($this->link !== null) { 130 return $this->link; 131 } 131 132 132 return null;133 }133 return null; 134 } 134 135 135 /** 136 * Author's email address 137 * 138 * @return string|null 139 */ 140 public function get_email() 141 { 142 if ($this->email !== null) 143 { 144 return $this->email; 145 } 136 /** 137 * Author's email address 138 * 139 * @return string|null 140 */ 141 public function get_email() 142 { 143 if ($this->email !== null) { 144 return $this->email; 145 } 146 146 147 return null;148 }147 return null; 148 } 149 149 } 150 151 class_alias('SimplePie\Author', 'SimplePie_Author');
Note: See TracChangeset
for help on using the changeset viewer.