-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUserRepositoryInterface.php
More file actions
49 lines (43 loc) · 993 Bytes
/
UserRepositoryInterface.php
File metadata and controls
49 lines (43 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* Definition of UserRepositoryInterface
*
* @copyright 2015-today Justso GmbH
* @author j.schirrmacher@justso.de
*/
namespace justso\justauth;
use justso\justapi\NotFoundException;
/**
* Interface UserRepositoryInterface
*/
interface UserRepositoryInterface
{
/**
* Returns the user identified by his id.
*
* @param int $id
* @return UserInterface
* @throws NotFoundException
*/
public function getById($id);
/**
* Returns the user identified by her e-mail.
*
* @param string $email
* @return UserInterface
* @throws NotFoundException
*/
public function getByEmail($email);
/**
* Logs in a user with the given access code.
*
* @param string $code
* @return UserInterface
* @throws NotFoundException
*/
public function getByAccessCode($code);
/**
* Makes the user object persistent.
*/
public function persist(UserInterface $user);
}