public function getPermissionId($permission)
    {
        if (is_numeric($permission))
            return $permission;
        elseif (is_string($permission))
            return $this->getPermissionIdFromName($permission);
        elseif ($permission instanceof BridgePermission)
            return $permission->id;
        else
            throw new \InvalidArgumentException('Permission to check must be a name, ID, or Permission object.');
    }