_style = new \PhpOffice\PhpWord\Style\ListItem(); $this->_textObject = new Text($text, $styleFont, $styleParagraph); $this->_depth = $depth; if (!is_null($styleList) && is_array($styleList)) { foreach ($styleList as $key => $value) { if (substr($key, 0, 1) != '_') { $key = '_' . $key; } $this->_style->setStyleValue($key, $value); } } } /** * Get ListItem style */ public function getStyle() { return $this->_style; } /** * Get ListItem TextRun */ public function getTextObject() { return $this->_textObject; } /** * Get ListItem depth */ public function getDepth() { return $this->_depth; } }