/**
  * (PHP 5 &gt;= 5.0.0)<br/>
  * Return the key of the current element
  * @link http://php.net/manual/en/iterator.key.php
  * @return string|string string on success, or null on failure.
  */
 public function key()
 {
     if (!$this->_current) {
         return null;
     }
     return $this->_current->getName();
 }
 /**
  * Update the frontend labels of the attribute
  *
  * @param Mage_Catalog_Model_Entity_Attribute              $attribute       Attribute to update
  * @param Aoe_AttributeConfigurator_Model_Config_Attribute $attributeConfig Attribute config
  *
  * @return void
  */
 protected function _updateAttributeLabels($attribute, $attributeConfig)
 {
     $stores = Mage::app()->getStores(true);
     $storeLabels = [];
     $frontendLabel = $attribute->getAttributeCode();
     foreach ($stores as $store) {
         /** @var Mage_Core_Model_Store $store */
         $storeLocale = Mage::getStoreConfig('general/locale/code', $store);
         $storeLabel = $attributeConfig->getLabel($storeLocale);
         if (!$storeLabel) {
             continue;
         }
         $storeLabels[$store->getId()] = $storeLabel;
         if (0 == $store->getId()) {
             $frontendLabel = $storeLabel;
         }
     }
     $attribute->setFrontendLabel($frontendLabel)->setStoreLabels($storeLabels);
     $attribute->save();
 }