1 | <?php |
||
21 | class UserRepository extends BaseRepository implements UserRepositoryInterface |
||
22 | { |
||
23 | /** |
||
24 | * Auth interface. |
||
25 | * |
||
26 | * @var \Laraflock\Dashboard\Repositories\Auth\AuthRepositoryInterface |
||
27 | */ |
||
28 | protected $auth; |
||
29 | |||
30 | /** |
||
31 | * Role interface. |
||
32 | * |
||
33 | * @var \Laraflock\Dashboard\Repositories\Role\RoleRepositoryInterface |
||
34 | */ |
||
35 | protected $role; |
||
36 | |||
37 | /** |
||
38 | * Sentinel instance. |
||
39 | * |
||
40 | * @var \Cartalyst\Sentinel\Sentinel |
||
41 | */ |
||
42 | protected $sentinel; |
||
43 | |||
44 | /** |
||
45 | * User instance. |
||
46 | * |
||
47 | * @var \Cartalyst\Sentinel\Users\EloquentUser |
||
48 | */ |
||
49 | protected $user; |
||
50 | |||
51 | /** |
||
52 | * The constructor. |
||
53 | * |
||
54 | * @param \Laraflock\Dashboard\Repositories\Auth\AuthRepositoryInterface $auth |
||
55 | * @param \Laraflock\Dashboard\Repositories\Role\RoleRepositoryInterface $role |
||
56 | * @param \Cartalyst\Sentinel\Sentinel $sentinel |
||
57 | * @param \Cartalyst\Sentinel\Users\EloquentUser $user |
||
58 | */ |
||
59 | 110 | public function __construct(AuthRepositoryInterface $auth, RoleRepositoryInterface $role, Sentinel $sentinel, EloquentUser $user) |
|
66 | |||
67 | /** |
||
68 | * {@inheritDoc} |
||
69 | */ |
||
70 | public function getAll() |
||
74 | |||
75 | /** |
||
76 | * {@inheritDoc} |
||
77 | */ |
||
78 | 1 | public function getAllWith($type) |
|
83 | |||
84 | /** |
||
85 | * {@inheritDoc} |
||
86 | */ |
||
87 | 8 | public function getById($id) |
|
91 | |||
92 | /** |
||
93 | * {@inheritDoc} |
||
94 | */ |
||
95 | 2 | public function getByIdWith($id, $type) |
|
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | 12 | public function create(array $data, $validate = true) |
|
121 | |||
122 | /** |
||
123 | * {@inheritDoc} |
||
124 | */ |
||
125 | 6 | public function update(array $data, $id, $validate = true) |
|
159 | |||
160 | /** |
||
161 | * {@inheritDoc} |
||
162 | */ |
||
163 | 3 | public function updatePassword(array $data, $validate = true) |
|
184 | |||
185 | /** |
||
186 | * {@inheritDoc} |
||
187 | */ |
||
188 | 2 | public function delete($id) |
|
198 | } |