Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
items;
}
/**
* Get item by index.
*
* @param int $index
*
* @return \PhpOffice\PhpWord\Element\AbstractContainer
*/
public function getItem($index)
{
if (array_key_exists($index, $this->items)) {
return $this->items[$index];
}
return null;
}
/**
* Set item.
*
* @param int $index
* @param \PhpOffice\PhpWord\Element\AbstractContainer $item
*/
public function setItem($index, $item): void
{
if (array_key_exists($index, $this->items)) {
$this->items[$index] = $item;
}
}
/**
* Add new item.
*
* @param \PhpOffice\PhpWord\Element\AbstractContainer $item
*
* @return int
*/
public function addItem($item)
{
$index = $this->countItems() + 1;
$this->items[$index] = $item;
return $index;
}
/**
* Get item count.
*
* @return int
*/
public function countItems()
{
return count($this->items);
}
}