1 | <?php |
||
34 | trait RoleRequestAwareTrait |
||
35 | { |
||
36 | /** |
||
37 | * Attribute on which Role is stored in Request |
||
38 | * |
||
39 | * @var string |
||
40 | * |
||
41 | * @access protected |
||
42 | */ |
||
43 | protected $roleAttribute = 'jnjxp/cheka:role'; |
||
44 | |||
45 | /** |
||
46 | * Set attribute on which to store role |
||
47 | * |
||
48 | * @param string $attr name of attribute |
||
49 | * |
||
50 | * @return $this |
||
51 | * |
||
52 | * @access public |
||
53 | */ |
||
54 | 10 | public function setRoleAttribute($attr) |
|
59 | |||
60 | /** |
||
61 | * Get role |
||
62 | * |
||
63 | * @param Request $request PSR7 Request |
||
64 | * |
||
65 | * @return RoleInterface |
||
66 | * |
||
67 | * @access protected |
||
68 | */ |
||
69 | 6 | protected function getRole(Request $request) |
|
79 | } |
||
80 |