src/Searsaw/Drawbridge/models/BridgeRole.php
public function checkPermission($check, BridgePermission $has)
    {
        if (is_string($check))
            return $this->checkPermissionByName($check, $has);
        elseif (is_numeric($check))
            return $this->checkPermissionById($check, $has);
        elseif ($check instanceof BridgePermission)
            return $this->checkPermissionByObject($check, $has);
        else
            throw new \InvalidArgumentException('Permission to check must be a name, ID, or Permission object.');
    }
public function checkPermission($check, BridgePermission $has)
    {
        if (is_string($check))
            return $this->checkPermissionByName($check, $has);
        elseif (is_numeric($check))
            return $this->checkPermissionById($check, $has);
        elseif ($check instanceof BridgePermission)
            return $this->checkPermissionByObject($check, $has);
        else
            throw new \InvalidArgumentException('Permission to check must be a name, ID, or Permission object.');
    }
public function checkPermission ( $ check , BridgePermission $ has ) { if ( is_string ( $ check ) ) return $ this -> checkPermissionByName ( $ check , $ has ) ; elseif ( is_numeric ( $ check ) ) return $ this -> checkPermissionById ( $ check , $ has ) ; elseif ( $ check instanceof BridgePermission ) return $ this -> checkPermissionByObject ( $ check , $ has ) ; else throw new \ InvalidArgumentException ( 'Permission to check must be a name, ID, or Permission object.' ) ; }
Checks to see if a given permission is equal to a permission the user already has

@param $check string|integer|\Searsaw\Drawbridge\Models\BridgePermission The permission to check
@param $has \Searsaw\Drawbridge\Models\BridgePermission The permission the user has to check against

@return mixed
@throws \InvalidArgumentException
Checks to see if a given permission is equal to a permission the user already has