/** * Gets rtf code for border * @param PHPRtfLite_Border_Format $borderFormat * @param PHPRtfLite $rtf * * @return string rtf code */ private function getBorderRtf(PHPRtfLite_Border_Format $borderFormat, PHPRtfLite $rtf) { $borderRtf = $borderFormat->getNotColoredPartOfContent(); $color = $borderFormat->getColor(); if ($color) { $rtf->addColor($color); $borderRtf .= '\\brdrcf' . $rtf->getColor($color); } return $borderRtf . ' '; }