textObject = new Text(SharedText::toUTF8($text), $fontStyle, $paragraphStyle); $this->depth = $depth; // Version >= 0.10.0 will pass numbering style name. Older version will use old method if (!is_null($listStyle) && is_string($listStyle)) { $this->style = new ListItemStyle($listStyle); // @codeCoverageIgnore } else { $this->style = $this->setNewStyle(new ListItemStyle(), $listStyle, true); } } /** * Get style * * @return \PhpOffice\PhpWord\Style\ListItem */ public function getStyle() { return $this->style; } /** * Get Text object * * @return \PhpOffice\PhpWord\Element\Text */ public function getTextObject() { return $this->textObject; } /** * Get depth * * @return int */ public function getDepth() { return $this->depth; } /** * Get text * * @return string * @since 0.11.0 */ public function getText() { return $this->textObject->getText(); } }