src/Subjects/AbstractEavSubject.php
public function getAttributeSetByAttributeSetName($attributeSetName)
    {

        // query whether or not attribute sets for the actualy entity type code are available
        if (isset($this->attributeSets[$entityTypeCode = $this->getEntityTypeCode()])) {
            // load the attribute sets for the actualy entity type code
            $attributSets = $this->attributeSets[$entityTypeCode];

            // query whether or not, the requested attribute set is available
            if (isset($attributSets[$attributeSetName])) {
                return $attributSets[$attributeSetName];
            }

            // throw an exception, if not
            throw new \Exception(
                $this->appendExceptionSuffix(
                    sprintf('Found invalid attribute set name "%s"', $attributeSetName)
                )
            );
        }

        // throw an exception, if not
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Found invalid entity type code "%s"', $entityTypeCode)
            )
        );
    }
public function getAttributeSetByAttributeSetName($attributeSetName)
    {

        // query whether or not attribute sets for the actualy entity type code are available
        if (isset($this->attributeSets[$entityTypeCode = $this->getEntityTypeCode()])) {
            // load the attribute sets for the actualy entity type code
            $attributSets = $this->attributeSets[$entityTypeCode];

            // query whether or not, the requested attribute set is available
            if (isset($attributSets[$attributeSetName])) {
                return $attributSets[$attributeSetName];
            }

            // throw an exception, if not
            throw new \Exception(
                $this->appendExceptionSuffix(
                    sprintf('Found invalid attribute set name "%s"', $attributeSetName)
                )
            );
        }

        // throw an exception, if not
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Found invalid entity type code "%s"', $entityTypeCode)
            )
        );
    }
Return's the attribute set with the passed attribute set name.

@param string $attributeSetName The name of the requested attribute set

@return array The attribute set data
@throws \Exception Is thrown, if the attribute set or the given entity type with the passed name is not available