Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | use oat\oatbox\session\SessionContext; |
| 4 | |
| 5 | /** |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; under version 2 |
| 9 | * of the License (non-upgradable). |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | * |
| 20 | * Copyright (c) 2013 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | /** |
| 25 | * Represents a Session. |
| 26 | * |
| 27 | * @access private |
| 28 | * @author Joel Bout, <joel@taotesting.com> |
| 29 | * @package generis |
| 30 | */ |
| 31 | interface common_session_Session |
| 32 | { |
| 33 | /** |
| 34 | * Get the user of the session |
| 35 | * |
| 36 | * Returns null if there is no user |
| 37 | * |
| 38 | * @access public |
| 39 | * @author Joel Bout, <joel@taotesting.com> |
| 40 | * @return oat\oatbox\user\User |
| 41 | */ |
| 42 | public function getUser(); |
| 43 | |
| 44 | /** |
| 45 | * Get the URI identifying the currently authenticated user in persistent memory. |
| 46 | * |
| 47 | * @access public |
| 48 | * @author Joel Bout, <joel@taotesting.com> |
| 49 | * @return string |
| 50 | */ |
| 51 | public function getUserUri(); |
| 52 | |
| 53 | /** |
| 54 | * A string representation of the current user. Might not be unique |
| 55 | * |
| 56 | * @access public |
| 57 | * @author Joel Bout, <joel@taotesting.com> |
| 58 | * @return string |
| 59 | */ |
| 60 | public function getUserLabel(); |
| 61 | |
| 62 | /** |
| 63 | * returns the roles of the current user |
| 64 | * |
| 65 | * @access public |
| 66 | * @author Joel Bout, <joel@taotesting.com> |
| 67 | * @return array An array of strings |
| 68 | */ |
| 69 | public function getUserRoles(); |
| 70 | |
| 71 | /** |
| 72 | * returns the language identifier to use for data |
| 73 | * |
| 74 | * @access public |
| 75 | * @author Joel Bout, <joel@taotesting.com> |
| 76 | * @return string |
| 77 | */ |
| 78 | public function getDataLanguage(); |
| 79 | |
| 80 | /** |
| 81 | * returns the language identifier to use for the interface |
| 82 | * |
| 83 | * @access public |
| 84 | * @author Joel Bout, <joel@taotesting.com> |
| 85 | * @return string |
| 86 | */ |
| 87 | public function getInterfaceLanguage(); |
| 88 | |
| 89 | /** |
| 90 | * returns the timezone to use for times |
| 91 | * |
| 92 | * @access public |
| 93 | * @author Joel Bout, <joel@taotesting.com> |
| 94 | * @return string |
| 95 | */ |
| 96 | public function getTimeZone(); |
| 97 | |
| 98 | /** |
| 99 | * Generic information retrieval of user data |
| 100 | * |
| 101 | * @param string $property |
| 102 | * @return array |
| 103 | */ |
| 104 | public function getUserPropertyValues($property); |
| 105 | |
| 106 | /** |
| 107 | * refreshes the information stored in the current session |
| 108 | */ |
| 109 | public function refresh(); |
| 110 | |
| 111 | /** |
| 112 | * Returns additional contexts of the current session |
| 113 | * @param string $class Class to filter the contexts by, or all if none provided |
| 114 | * @return SessionContext[] |
| 115 | */ |
| 116 | public function getContexts(string $class = null): array; |
| 117 | } |