src/Observers/EntityAttributeObserver.php
protected function process()
    {

        // query whether or not, we've found a new attribute code => means we've found a new attribute
        if ($this->hasBeenProcessed($this->getValue(ColumnKeys::ATTRIBUTE_CODE))) {
            return;
        }

        // load the last attribute ID
        $this->attributeId = $this->getLastAttributeId();

        // map the entity type code to the ID
        $entityType = $this->getEntityType($this->entityTypeCode = $this->getValue(ColumnKeys::ENTITY_TYPE_CODE));
        $this->entityTypeId = $entityType[MemberNames::ENTITY_TYPE_ID];

        // load the sort order for the attribute
        $this->sortOrder = $this->getValue(ColumnKeys::SORT_ORDER, 0);

        // explode the attribute set + group names
        $attributeSetNames = $this->getValue(ColumnKeys::ATTRIBUTE_SET_NAME, array(), array($this, 'explode'));
        $attributeGroupNames = $this->getValue(ColumnKeys::ATTRIBUTE_GROUP_NAME, array(), array($this, 'explode'));

        // make sure we've the same number of attribute sets/gropus
        if (sizeof($attributeSetNames) !== sizeof($attributeGroupNames)) {
            throw new \Exception(sprintf('Size of attribute names doesn\'t match size of attribute groups'));
        }

        // iterate over the attribute names and create the attribute entities therefore
        foreach ($attributeSetNames as $key => $attributeSetName) {
            // load the attribute set ID
            $attributeSet = $this->getAttributeSetByAttributeSetNameAndEntityTypeCode($attributeSetName, $this->entityTypeCode);

            // initialize the values to create the attribute entity
            $this->attributeSetId = $attributeSet[MemberNames::ATTRIBUTE_SET_ID];
            $this->attributeSetName = $attributeSetName;
            $this->attributeGroupName = $attributeGroupNames[$key];

            // prepare the EAV entity attribue values
            $entityAttribute = $this->initializeAttribute($this->prepareAttributes());

            // insert the EAV entity attribute
            $this->persistEntityAttribute($entityAttribute);
        }
    }
protected function process()
    {

        // query whether or not, we've found a new attribute code => means we've found a new attribute
        if ($this->hasBeenProcessed($this->getValue(ColumnKeys::ATTRIBUTE_CODE))) {
            return;
        }

        // load the last attribute ID
        $this->attributeId = $this->getLastAttributeId();

        // map the entity type code to the ID
        $entityType = $this->getEntityType($this->entityTypeCode = $this->getValue(ColumnKeys::ENTITY_TYPE_CODE));
        $this->entityTypeId = $entityType[MemberNames::ENTITY_TYPE_ID];

        // load the sort order for the attribute
        $this->sortOrder = $this->getValue(ColumnKeys::SORT_ORDER, 0);

        // explode the attribute set + group names
        $attributeSetNames = $this->getValue(ColumnKeys::ATTRIBUTE_SET_NAME, array(), array($this, 'explode'));
        $attributeGroupNames = $this->getValue(ColumnKeys::ATTRIBUTE_GROUP_NAME, array(), array($this, 'explode'));

        // make sure we've the same number of attribute sets/gropus
        if (sizeof($attributeSetNames) !== sizeof($attributeGroupNames)) {
            throw new \Exception(sprintf('Size of attribute names doesn\'t match size of attribute groups'));
        }

        // iterate over the attribute names and create the attribute entities therefore
        foreach ($attributeSetNames as $key => $attributeSetName) {
            // load the attribute set ID
            $attributeSet = $this->getAttributeSetByAttributeSetNameAndEntityTypeCode($attributeSetName, $this->entityTypeCode);

            // initialize the values to create the attribute entity
            $this->attributeSetId = $attributeSet[MemberNames::ATTRIBUTE_SET_ID];
            $this->attributeSetName = $attributeSetName;
            $this->attributeGroupName = $attributeGroupNames[$key];

            // prepare the EAV entity attribue values
            $entityAttribute = $this->initializeAttribute($this->prepareAttributes());

            // insert the EAV entity attribute
            $this->persistEntityAttribute($entityAttribute);
        }
    }
Process the observer's business logic.

@return void