src/Registry/EntityRegistry.php
public function set(EntityInterface $entity): string
    {
        $hash = $entity->calculateHash();
        $content = $this->encodeContent($entity->writeData());
        $this->saveContent($hash, $content);
        return $hash;
    }
public function set(EntityInterface $entity): string
    {
        $hash = $entity->calculateHash();
        $content = $this->encodeContent($entity->writeData());
        $this->saveContent($hash, $content);
        return $hash;
    }
public function set ( EntityInterface $ entity ) : string { $ hash = $ entity -> calculateHash ( ) ; $ content = $ this -> encodeContent ( $ entity -> writeData ( ) ) ; $ this -> saveContent ( $ hash , $ content ) ; return $ hash ; }
Sets the specified entity into the registry.
@param EntityInterface $entity
@return string The hash used to save the entity.
Sets the specified entity into the registry .