public function tryResourceAssignation(DomainResource $resource)
    {
        if ($type = $this->matchType($resource)) {
            $this->resources[$type] = $resource;

            return true;
        }

        return false;
    }