private function &addToObjectPool($registered_type, $id, &$value_to_store)
    {
        if (empty($this->objects_pool[$registered_type])) {
            $this->objects_pool[$registered_type] = [];
        }

        $this->objects_pool[$registered_type][$id] = $value_to_store;

        return $this->objects_pool[$registered_type][$id];
    }
private function &addToObjectPool($registered_type, $id, &$value_to_store)
    {
        if (empty($this->objects_pool[$registered_type])) {
            $this->objects_pool[$registered_type] = [];
        }

        $this->objects_pool[$registered_type][$id] = $value_to_store;

        return $this->objects_pool[$registered_type][$id];
    }
private function & addToObjectPool ( $ registered_type , $ id , & $ value_to_store ) { if ( empty ( $ this -> objects_pool [ $ registered_type ] ) ) { $ this -> objects_pool [ $ registered_type ] = [ ] ; } $ this -> objects_pool [ $ registered_type ] [ $ id ] = $ value_to_store ; return $ this -> objects_pool [ $ registered_type ] [ $ id ] ; }
Add object to the object pool.

@param  string               $registered_type
@param  int                  $id
@param  EntityInterface|null $value_to_store
@return EntityInterface
Add object to the object pool .