| @@ 3-16 (lines=14) @@ | ||
| 1 | <?php |
|
| 2 | ||
| 3 | if (! function_exists('acl')) { |
|
| 4 | /** |
|
| 5 | * @return \Napp\Core\Acl\AclService |
|
| 6 | */ |
|
| 7 | function acl() |
|
| 8 | { |
|
| 9 | $arguments = func_get_args(); |
|
| 10 | if (empty($arguments)) { |
|
| 11 | return app(\Napp\Core\Acl\AclService::class); |
|
| 12 | } |
|
| 13 | ||
| 14 | return app(\Napp\Core\Acl\AclService::class)->may($arguments[0]); |
|
| 15 | } |
|
| 16 | } |
|
| 17 | ||
| 18 | if (! function_exists('may')) { |
|
| 19 | /** |
|
| @@ 18-31 (lines=14) @@ | ||
| 15 | } |
|
| 16 | } |
|
| 17 | ||
| 18 | if (! function_exists('may')) { |
|
| 19 | /** |
|
| 20 | * @return \Napp\Core\Acl\AclService |
|
| 21 | */ |
|
| 22 | function may() |
|
| 23 | { |
|
| 24 | $arguments = func_get_args(); |
|
| 25 | if (empty($arguments)) { |
|
| 26 | return app(\Napp\Core\Acl\AclService::class); |
|
| 27 | } |
|
| 28 | ||
| 29 | return app(\Napp\Core\Acl\AclService::class)->may($arguments[0]); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| 33 | if (! function_exists('maynot')) { |
|
| 34 | /** |
|