doc/DocParser: Rename 'header' to 'title'

refs #4820
This commit is contained in:
Eric Lippmann 2014-07-29 11:12:06 +02:00
parent 38a6df91b9
commit 3cafc8910a

View File

@ -131,9 +131,7 @@ class DocParser
foreach ($file as $line) {
$header = $this->extractHeader($line, $lastLine);
if ($header !== null) {
list($header, $id, $level) = $header; // When overwriting the variable to extract, it has to be
// list()'s first parameter since list() assigns the values
// starting with the right-most parameter
list($title, $id, $level) = $header;
while (! $stack->isEmpty() && $stack->top()->getLevel() >= $level) {
$stack->pop();
}
@ -143,19 +141,19 @@ class DocParser
/* @var $section Section */
$path[] = $section->getTitle();
}
$path[] = $header;
$path[] = $title;
$id = implode('-', $path);
$nofollow = true;
} else {
$nofollow = false;
}
if ($stack->isEmpty()) {
$chapterTitle = $header;
$section = new Section($id, $header, $level, $nofollow, $chapterTitle);
$chapterTitle = $title;
$section = new Section($id, $title, $level, $nofollow, $chapterTitle);
$tree->addRoot($section);
} else {
$chapterTitle = $stack->bottom()->getTitle();
$section = new Section($id, $header, $level, $nofollow, $chapterTitle);
$section = new Section($id, $title, $level, $nofollow, $chapterTitle);
$tree->addChild($section, $stack->top());
}
$stack->push($section);