containerType = 'textrun'; $this->docPartType = $docPartType; $this->docPartId = $docPartId; // Set paragraph style if (is_array($paragraphStyle)) { $this->paragraphStyle = new Paragraph(); foreach ($paragraphStyle as $key => $value) { if (substr($key, 0, 1) != '_') { $key = '_' . $key; } $this->paragraphStyle->setStyleValue($key, $value); } } else { $this->paragraphStyle = $paragraphStyle; } } /** * Get Paragraph style * * @return string|Paragraph */ public function getParagraphStyle() { return $this->paragraphStyle; } }