* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * */ namespace libgpx; use \InvalidArgumentException; /** * A GPX Person. * * @see https://www.topografix.com/GPX/1/1/#type_personType * * @author Andy Street */ class Person { /** * Name of person or organization. * * @var string */ protected $name; /** * Email address. * * @var string */ protected $email; /** * Link to Web site or other external information about person. * * @var Link */ protected $link; /** * Fetch the name of the person. * * @return string|null The name or null if not set. */ public function getName() { return $this->name; } /** * Set the name of the person. * * @param string|null $name The name or null to delete. * @return void */ public function setName(string $name = null) { $this->name = $name; } /** * Fetch the email address of the person. * * @return string|null The email address or null if not set. */ public function getEmail() { return $this->email; } /** * Set the email address of the person. * * @param string|null $email The email address or null to delete. * @return void */ public function setEmail(string $email = null) { $this->email = $email; } /** * Fetch a link to a resource connected to the person. * * @return Link|null The link or null if not set. */ public function getLink() { return $this->link; } /** * Set the link to a resource connected to the person. * * @param Link|null $link The link or null to delete. * @return void */ public function setLink(Link $link = null) { $this->link = $link; } }