protected function checkRoleResource($role, $resource)
    {
        $resource = $this->checkResource($resource);
        $role = $this->checkRole($role);
        $roleId = ($role->getRoleId() == null) ? StorageInterface::ALL_ROLES : $role->getRoleId();
        $resrcId = ($resource->getResourceId() == null) ? StorageInterface::ALL_RESOURCES : $resource->getResourceId();
        if (!isset($this->permission[$roleId][self::NODE_RESOURCES][$resrcId][self::NODE_PERMISSION])) {
            $this->permission[$roleId][self::NODE_RESOURCES][$resrcId][self::NODE_PERMISSION] = [];
        }

        return $this;
    }