protected getContentObject ( ) : integer | ||
return | integer |
protected function getContentObject()
{
// If the page's current content object index is not set, create one.
if (null === $this->objects[$this->objects[$this->pages[$this->curPage]]->index]->curContent) {
$coi = $this->lastIndex($this->objects) + 1;
$this->objects[$this->objects[$this->pages[$this->curPage]]->index]->content[] = $coi;
$this->objects[$this->objects[$this->pages[$this->curPage]]->index]->curContent = $coi;
$this->objects[$coi] = new Object\Object($coi);
// Else, set and return the page's current content object index.
} else {
$coi = $this->objects[$this->objects[$this->pages[$this->curPage]]->index]->curContent;
}
return $coi;
}