1 | <?php namespace Arcanesoft\Auth\Providers; |
||
14 | class AuthorizationServiceProvider extends ServiceProvider |
||
15 | { |
||
16 | /* ------------------------------------------------------------------------------------------------ |
||
17 | | Properties |
||
18 | | ------------------------------------------------------------------------------------------------ |
||
19 | */ |
||
20 | /** |
||
21 | * The policy mappings for the application. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $policies = [ |
||
26 | // |
||
27 | ]; |
||
28 | |||
29 | /* ------------------------------------------------------------------------------------------------ |
||
30 | | Main Functions |
||
31 | | ------------------------------------------------------------------------------------------------ |
||
32 | */ |
||
33 | /** |
||
34 | * Register any application authentication / authorization services. |
||
35 | * |
||
36 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
37 | */ |
||
38 | 24 | public function boot(GateContract $gate) |
|
47 | |||
48 | /* ------------------------------------------------------------------------------------------------ |
||
49 | | Policies |
||
50 | | ------------------------------------------------------------------------------------------------ |
||
51 | */ |
||
52 | /** |
||
53 | * Register users authorizations. |
||
54 | * |
||
55 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
56 | */ |
||
57 | 24 | private function registerUsersPolicies(GateContract $gate) |
|
64 | |||
65 | /** |
||
66 | * Register roles authorizations. |
||
67 | * |
||
68 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
69 | */ |
||
70 | 24 | private function registerRolesPolicies(GateContract $gate) |
|
77 | |||
78 | /** |
||
79 | * Register permissions authorizations. |
||
80 | * |
||
81 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
82 | */ |
||
83 | 24 | private function registerPermissionsPolicies(GateContract $gate) |
|
90 | |||
91 | /** |
||
92 | * Register other authorizations for auth module. |
||
93 | * |
||
94 | * @param \Illuminate\Contracts\Auth\Access\Gate $gate |
||
95 | */ |
||
96 | private function registerOtherPolicies(GateContract $gate) |
||
102 | } |
||
103 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.