protected function startParser($name, $payload = NULL)
{
if (!preg_match('/^[a-zA-Z0-9-_\\.]*$/', $name) || empty($name)) {
// TODO: errorlog
$this->current = $this->factory->getParserInstanceFor('invalid', $name);
} else {
$this->current = $this->factory->getParserInstanceFor($name);
}
$this->current->setAliasMap($this->aliasMap);
if ($payload !== NULL) {
$this->current->setPayload($payload);
}
}