protected function getAllAttributes($includeInheritanceAttributes, $requiredFirst)
{
$allAttributes = new StructAttributeContainer($this->getGenerator());
if ($includeInheritanceAttributes === true) {
$this->addInheritanceAttributes($allAttributes);
}
foreach ($this->attributes as $attribute) {
$allAttributes->add($attribute);
}
if ($requiredFirst === true) {
$attributes = $this->putRequiredFirst($allAttributes);
} else {
$attributes = $allAttributes;
}
return $attributes;
}