public function offsetSet($name, $object)
    {
        if (!$object instanceof LibBaseTemplateObjectInterface) {
            if (empty($name)) {
                throw new AnConfigException('Template object name must be unique and non empty');
            }

            $object = LibBaseTemplateObject::getInstance($name, $object);
        }

        $this->_objects[$object->getName()] = $object;

        return $object;
    }