| 1 | <?php namespace Modules\User\Repositories\Sentinel; |
||
| 7 | class SentinelRoleRepository implements RoleRepository |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \Cartalyst\Sentinel\Roles\EloquentRole |
||
| 11 | */ |
||
| 12 | protected $role; |
||
| 13 | |||
| 14 | public function __construct() |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Return all the roles |
||
| 21 | * @return mixed |
||
| 22 | */ |
||
| 23 | public function all() |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Create a role resource |
||
| 30 | * @return mixed |
||
| 31 | */ |
||
| 32 | public function create($data) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Find a role by its id |
||
| 39 | * @param $id |
||
| 40 | * @return mixed |
||
| 41 | */ |
||
| 42 | public function find($id) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Update a role |
||
| 49 | * @param $id |
||
| 50 | * @param $data |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | public function update($id, $data) |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Delete a role |
||
| 66 | * @param $id |
||
| 67 | * @return mixed |
||
| 68 | */ |
||
| 69 | public function delete($id) |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Find a role by its name |
||
| 78 | * @param string $name |
||
| 79 | * @return mixed |
||
| 80 | */ |
||
| 81 | public function findByName($name) |
||
| 85 | } |
||
| 86 |