public function addText($text = '', $fStyle = array()) { $textOfSameFormat = new TextOfSameFormat(); $textOfSameFormat->setText($text); $textOfSameFormat->setFStyle($fStyle); array_push($this->_text, $textOfSameFormat); }
public function addText($text = '', $fStyle = array()) { //array_merge($this->_paragrWithDiffStyle,$text=>); //array_push($this->_paragrWithDiffStyle,$text=>$fStyle); //$this->_paragrWithDiffStyle[$text]=$fStyle; $textOfSameFormat = new TextOfSameFormat(); $textOfSameFormat->setText($text); $textOfSameFormat->setFStyle($fStyle); array_push($this->_paragrWithDiffStyle, $textOfSameFormat); }