| 1 | <?php |
||
| 8 | class Author |
||
| 9 | { |
||
| 10 | /** @var string */ |
||
| 11 | private $name; |
||
| 12 | |||
| 13 | /** @var string */ |
||
| 14 | private $url; |
||
| 15 | |||
| 16 | /** @var string */ |
||
| 17 | private $avatar; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructor |
||
| 21 | * |
||
| 22 | * @param string $name |
||
| 23 | */ |
||
| 24 | public function __construct($name) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get the author’s name |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public function getName() |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get the URL of a site owned by the author |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function getUrl() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Set the URL of a site owned by the author |
||
| 51 | * |
||
| 52 | * @param string $url |
||
| 53 | * @return Author |
||
| 54 | */ |
||
| 55 | public function setUrl($url) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Get the URL for an image for the author |
||
| 64 | * |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | public function getAvatar() |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Set the URL for an image for the author |
||
| 74 | * |
||
| 75 | * @param string $avatar |
||
| 76 | * @return Author |
||
| 77 | */ |
||
| 78 | public function setAvatar($avatar) |
||
| 84 | } |
||
| 85 |