protected function _loadPlacementGroupData(\SimpleXMLElement $v)
{
$item = null;
if ($this->exist($v)) {
$groupName = (string) $v->groupName;
$item = $this->ec2->getEntityManagerEnabled() ? $this->ec2->placementGroup->get($groupName) : null;
if ($item === null) {
$item = new PlacementGroupData();
$item->setEc2($this->ec2);
$bAttach = true;
} else {
$item->resetObject();
$bAttach = false;
}
$item->groupName = $groupName;
$item->state = (string) $v->state;
$item->strategy = (string) $v->strategy;
if ($bAttach && $this->ec2->getEntityManagerEnabled()) {
$this->getEntityManager()->attach($item);
}
}
return $item;
}