private function setArrayOfTables($key)
{
$nameParts = explode('.', $key);
$endIndex = count($nameParts) - 1;
if (true == $this->isTableImplicit($nameParts)) {
$this->addInvalidArrayTablesName($nameParts);
$this->setTable($key);
return;
}
if (in_array($key, $this->invalidArrayTablesName)) {
throw new ParseException(sprintf('Syntax error: the array of tables %s has already been defined as previous table', $key), $this->currentLine, $this->lexer->getCurrentToken()->getValue());
}
$this->data =& $this->result;
$this->arrayTableNames[] = $key;
foreach ($nameParts as $index => $namePart) {
if (0 == strlen($namePart)) {
throw new ParseException('The key must not be empty', $this->currentLine, $key);
}
if (false == array_key_exists($namePart, $this->data)) {
$this->data[$namePart] = array();
$this->data[$namePart][] = array();
} elseif ($endIndex == $index) {
$this->data[$namePart][] = array();
}
$this->data =& $this->getLastElementRef($this->data[$namePart]);
}
}