Changeset 59141 for trunk/src/wp-includes/SimplePie/src/Author.php
- Timestamp:
- 09/30/2024 10:48:16 PM (4 months ago)
- Location:
- trunk/src/wp-includes/SimplePie/src
- Files:
-
- 1 added
- 1 moved
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 58 59 60 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 66 67 68 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 74 75 76 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 82 83 84 85 86 87 88 89 90 91 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 96 97 98 99 100 101 102 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 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 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 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.