private function buildMapSubject(array $objects)
    {
        $subjects = [];

        foreach ($objects as $object) {
            $subject = SubjectIdentity::fromObject($object);
            $id = SharingUtils::getCacheId($subject);
            $subjects[$id] = $subject;
        }

        return $subjects;
    }