/**
* Get an attribute by name
* @param string $name Attribute name
* @return ConfigurationAttribute|null
* @since 1.0
*/
public function getAttribute($name, $returnValue = true)
{
$attribute = $this->attributes->filter(function ($attr) use($name) {
/** @var ConfigurationAttribute $attr */
return $attr->getName() == $name;
})->first();
return $returnValue && $attribute ? $attribute->getValue() : $attribute;
}