| 1 | <?php namespace Mascame\Artificer\Permit; |
||
| 5 | abstract class Permit extends Auth |
||
| 6 | { |
||
| 7 | |||
| 8 | protected static $role = null; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @param $to |
||
| 12 | */ |
||
| 13 | public static function access($to) |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param $action |
||
| 20 | */ |
||
| 21 | public static function to($action) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $role_column |
||
| 28 | * @return null |
||
| 29 | */ |
||
| 30 | public static function getRole($role_column = 'role') |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param null $permissions |
||
| 45 | * @return bool |
||
| 46 | */ |
||
| 47 | public static function hasPermission($permissions = null) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param $permissions |
||
| 62 | * @return bool |
||
| 63 | */ |
||
| 64 | private static function hasNeededRole($permissions) |
||
| 68 | } |