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;
    }
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;
    }
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 ; }
Set a value by key.

@param   string  The key name.
@param   mixed   The value for the key

@throws AnConfigException if the $name is empty
Set a value by key .