Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/12/2012, 22:19
lalolerena
 
Fecha de Ingreso: octubre-2010
Ubicación: Uruguay, Canelones
Mensajes: 66
Antigüedad: 13 años, 7 meses
Puntos: 6
Pregunta Problema en section en Zend_Config_Ini

Buenas gente,
Espero puedan ayudarme.

Tengo un problema con el Zend_Config_Ini
Tengo una sección dentro del config que tiene varios atributos, y existe un formulario que permite agregar tantos atributos como el cliente lo desee.

El tema pasa que cuando quiero actualizar y agregar un nuevo atributo este no se me agrega, sino que me sobreescribe el anterior.

Ejemplo:
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->$name->{Eav_Attribute::KEY_ID} = $attribute->getId();
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->$name->{Eav_Attribute::KEY_NAME} = $name;
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->$name->{Eav_Attribute::KEY_INDENTIFIER} = $attribute->isIdentifier();
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->$name->{Eav_Attribute::KEY_RELATION} = $attribute->getRelation();
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->$name->{Eav_Attribute::KEY_REQUIRED} = $attribute->isRequired();
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->$name->{Eav_Attribute::KEY_TYPE} = $attribute->getType();
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->$name->{Eav_Attribute::KEY_LIST_VALUES} = $attribute->getValuesList();

Genero por primera vez esta sección y se agrega bien,

Pero cuando realizo:
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->othername->{Eav_Attribute::KEY_ID} = sadcdsklc;
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->othername->{Eav_Attribute::KEY_NAME} = sadcdsklc;
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->othername->{Eav_Attribute::KEY_INDENTIFIER} = sadcdsklc;
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->othername->{Eav_Attribute::KEY_RELATION} = sadcdsklc;
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->othername->{Eav_Attribute::KEY_REQUIRED} = sadcdsklc;
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->othername->{Eav_Attribute::KEY_TYPE} = sadcdsklc;
$config->$sectionName->{self::CONFIG_KEY_ATTRIBUTES}->othername->{Eav_Attribute::KEY_LIST_VALUES} = sadcdsklc;

Esta nueva sección sobreescribe la anterior, no he podido encontrar documentación que me solucione el problema.

Yo lo que necesito es que cada atributo que se cree se agregue dentro de la sección, juntos con los otros atributos que esten.

Desde ya muchas gracias por la ayuda,

Luis