public function getAttribute($name)
    {
        if (mb_strpos($name, '.')) {
            return $this->getAttributeByPath($name);
        }

        if ($this->attribute_map->hasKey($name)) {
            return $this->attribute_map->getItem($name);
        } else {
            throw new RuntimeException('Type has no attribute: ' . $name);
        }
    }
public function getAttribute($name)
    {
        if (mb_strpos($name, '.')) {
            return $this->getAttributeByPath($name);
        }

        if ($this->attribute_map->hasKey($name)) {
            return $this->attribute_map->getItem($name);
        } else {
            throw new RuntimeException('Type has no attribute: ' . $name);
        }
    }
public function getAttribute ( $ name ) { if ( mb_strpos ( $ name , '.' ) ) { return $ this -> getAttributeByPath ( $ name ) ; } if ( $ this -> attribute_map -> hasKey ( $ name ) ) { return $ this -> attribute_map -> getItem ( $ name ) ; } else { throw new RuntimeException ( 'Type has no attribute: ' . $ name ) ; } }
Returns a certain type attribute by name.

@param string $name

@return AttributeInterface

@throws RuntimeException
Returns a certain type attribute by name .