1b08296eeSGreg Roach<?php 23976b470SGreg Roach 3b08296eeSGreg Roach/** 4b08296eeSGreg Roach * webtrees: online genealogy 5b08296eeSGreg Roach * Copyright (C) 2019 webtrees development team 6b08296eeSGreg Roach * This program is free software: you can redistribute it and/or modify 7b08296eeSGreg Roach * it under the terms of the GNU General Public License as published by 8b08296eeSGreg Roach * the Free Software Foundation, either version 3 of the License, or 9b08296eeSGreg Roach * (at your option) any later version. 10b08296eeSGreg Roach * This program is distributed in the hope that it will be useful, 11b08296eeSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12b08296eeSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13b08296eeSGreg Roach * GNU General Public License for more details. 14b08296eeSGreg Roach * You should have received a copy of the GNU General Public License 15b08296eeSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 16b08296eeSGreg Roach */ 17fcfa147eSGreg Roach 18b08296eeSGreg Roachdeclare(strict_types=1); 19b08296eeSGreg Roach 20e5a6b4d4SGreg Roachnamespace Fisharebest\Webtrees\Contracts; 21b08296eeSGreg Roach 22b08296eeSGreg Roach/** 23b3a775f6SGreg Roach * behavior required of a user object. 24b08296eeSGreg Roach */ 25e5a6b4d4SGreg Roachinterface UserInterface 26b08296eeSGreg Roach{ 27b08296eeSGreg Roach /** 28e5a6b4d4SGreg Roach * The user‘s internal identifier 29b08296eeSGreg Roach * 30b08296eeSGreg Roach * @return int 31b08296eeSGreg Roach */ 32e5a6b4d4SGreg Roach public function id(): int; 33b08296eeSGreg Roach 34b08296eeSGreg Roach /** 35e5a6b4d4SGreg Roach * The users email address. 36b08296eeSGreg Roach * 37b08296eeSGreg Roach * @return string 38b08296eeSGreg Roach */ 39e5a6b4d4SGreg Roach public function email(): string; 40b08296eeSGreg Roach 41b08296eeSGreg Roach /** 42e5a6b4d4SGreg Roach * The user‘s real name. 43b08296eeSGreg Roach * 44b08296eeSGreg Roach * @return string 45b08296eeSGreg Roach */ 46e5a6b4d4SGreg Roach public function realName(): string; 47b08296eeSGreg Roach 48b08296eeSGreg Roach /** 49e5a6b4d4SGreg Roach * The user‘s login name. 50b08296eeSGreg Roach * 51b08296eeSGreg Roach * @return string 52b08296eeSGreg Roach */ 53e5a6b4d4SGreg Roach public function userName(): string; 54b08296eeSGreg Roach 55b08296eeSGreg Roach /** 56b08296eeSGreg Roach * @param string $setting_name 57b08296eeSGreg Roach * @param string $default 58b08296eeSGreg Roach * 59b08296eeSGreg Roach * @return string 60b08296eeSGreg Roach */ 61e5a6b4d4SGreg Roach public function getPreference(string $setting_name, string $default = ''): string; 62b08296eeSGreg Roach 63b08296eeSGreg Roach /** 64b08296eeSGreg Roach * @param string $setting_name 65b08296eeSGreg Roach * @param string $setting_value 66b08296eeSGreg Roach * 67*7c4add84SGreg Roach * @return void 68b08296eeSGreg Roach */ 69*7c4add84SGreg Roach public function setPreference(string $setting_name, string $setting_value): void; 70b08296eeSGreg Roach} 71