| 1 | <?php namespace App\Modules\Users\Repositories; |
||
| 7 | class UserRepository extends BaseRepository |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Init new object. |
||
| 11 | * |
||
| 12 | * @param AclUser $model |
||
| 13 | * @return void |
||
|
|
|||
| 14 | */ |
||
| 15 | public function __construct(AclUser $model) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Detach all roles from the given role. |
||
| 22 | * |
||
| 23 | * @param mixed $role |
||
| 24 | * @return object |
||
| 25 | */ |
||
| 26 | public function detachRoles($role) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Attach role ids to the given role. |
||
| 34 | * |
||
| 35 | * @param mixed $role |
||
| 36 | * @param array $roleIds |
||
| 37 | * @return object |
||
| 38 | */ |
||
| 39 | public function attachRoles($role, $roleIds) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Count the given user the given roles. |
||
| 47 | * |
||
| 48 | * @param mixed $user |
||
| 49 | * @param string[] $roles |
||
| 50 | * @return boolean |
||
| 51 | */ |
||
| 52 | public function countRoles($user, $roles) |
||
| 57 | } |
||
| 58 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.