lib/PHPRtfLite/ParFormat.php
public function getContent()
    {
        $content = '';

        switch ($this->_alignment) {
            case self::TEXT_ALIGN_RIGHT:
                $content .= '\qr ';
                break;

            case self::TEXT_ALIGN_CENTER:
                $content .= '\qc ';
                break;

            case self::TEXT_ALIGN_JUSTIFY:
                $content .= '\qj ';
                break;

            default:
                $content .= '\ql ';
                break;
        }

        if ($this->_indentFirstLine != 0) {
            $content .= '\fi' . PHPRtfLite_Unit::getUnitInTwips($this->_indentFirstLine) . ' ';
        }

        if ($this->_indentLeft > 0) {
            $content .= '\li' . PHPRtfLite_Unit::getUnitInTwips($this->_indentLeft) . ' ';
        }

        if ($this->_indentRight > 0) {
            $content .= '\ri' . PHPRtfLite_Unit::getUnitInTwips($this->_indentRight) .' ';
        }

        if ($this->_spaceBefore > 0) {
            $content .= '\sb' . $this->_spaceBefore.' ';
        }

        if ($this->_spaceAfter > 0) {
            $content .= '\sa' . $this->_spaceAfter.' ';
        }

        if ($this->_spaceBetweenLines > 0) {
            $content .= '\sl' . $this->_spaceBetweenLines.' ';
        }

        if ($this->_border) {
            $content .= $this->_border->getContent('\\');
        }

        if ($this->_shading > 0) {
            $content .= '\shading' . $this->_shading . ' ';
        }

        if ($this->_backgroundColor && $this->_colorTable) {
            $colorIndex = $this->_colorTable->getColorIndex($this->_backgroundColor);
            if ($colorIndex !== false) {
                $content .= '\cbpat' . $colorIndex . ' ';
            }
        }

        return $content;
    }
public function getContent()
    {
        $content = '';

        switch ($this->_alignment) {
            case self::TEXT_ALIGN_RIGHT:
                $content .= '\qr ';
                break;

            case self::TEXT_ALIGN_CENTER:
                $content .= '\qc ';
                break;

            case self::TEXT_ALIGN_JUSTIFY:
                $content .= '\qj ';
                break;

            default:
                $content .= '\ql ';
                break;
        }

        if ($this->_indentFirstLine != 0) {
            $content .= '\fi' . PHPRtfLite_Unit::getUnitInTwips($this->_indentFirstLine) . ' ';
        }

        if ($this->_indentLeft > 0) {
            $content .= '\li' . PHPRtfLite_Unit::getUnitInTwips($this->_indentLeft) . ' ';
        }

        if ($this->_indentRight > 0) {
            $content .= '\ri' . PHPRtfLite_Unit::getUnitInTwips($this->_indentRight) .' ';
        }

        if ($this->_spaceBefore > 0) {
            $content .= '\sb' . $this->_spaceBefore.' ';
        }

        if ($this->_spaceAfter > 0) {
            $content .= '\sa' . $this->_spaceAfter.' ';
        }

        if ($this->_spaceBetweenLines > 0) {
            $content .= '\sl' . $this->_spaceBetweenLines.' ';
        }

        if ($this->_border) {
            $content .= $this->_border->getContent('\\');
        }

        if ($this->_shading > 0) {
            $content .= '\shading' . $this->_shading . ' ';
        }

        if ($this->_backgroundColor && $this->_colorTable) {
            $colorIndex = $this->_colorTable->getColorIndex($this->_backgroundColor);
            if ($colorIndex !== false) {
                $content .= '\cbpat' . $colorIndex . ' ';
            }
        }

        return $content;
    }
public function getContent ( ) { $ content = '' ; switch ( $ this -> _alignment ) { case self :: TEXT_ALIGN_RIGHT : $ content .= '\qr ' ; break ; case self :: TEXT_ALIGN_CENTER : $ content .= '\qc ' ; break ; case self :: TEXT_ALIGN_JUSTIFY : $ content .= '\qj ' ; break ; default : $ content .= '\ql ' ; break ; } if ( $ this -> _indentFirstLine != 0 ) { $ content .= '\fi' . PHPRtfLite_Unit :: getUnitInTwips ( $ this -> _indentFirstLine ) . ' ' ; } if ( $ this -> _indentLeft > 0 ) { $ content .= '\li' . PHPRtfLite_Unit :: getUnitInTwips ( $ this -> _indentLeft ) . ' ' ; } if ( $ this -> _indentRight > 0 ) { $ content .= '\ri' . PHPRtfLite_Unit :: getUnitInTwips ( $ this -> _indentRight ) . ' ' ; } if ( $ this -> _spaceBefore > 0 ) { $ content .= '\sb' . $ this -> _spaceBefore . ' ' ; } if ( $ this -> _spaceAfter > 0 ) { $ content .= '\sa' . $ this -> _spaceAfter . ' ' ; } if ( $ this -> _spaceBetweenLines > 0 ) { $ content .= '\sl' . $ this -> _spaceBetweenLines . ' ' ; } if ( $ this -> _border ) { $ content .= $ this -> _border -> getContent ( '\\' ) ; } if ( $ this -> _shading > 0 ) { $ content .= '\shading' . $ this -> _shading . ' ' ; } if ( $ this -> _backgroundColor && $ this -> _colorTable ) { $ colorIndex = $ this -> _colorTable -> getColorIndex ( $ this -> _backgroundColor ) ; if ( $ colorIndex !== false ) { $ content .= '\cbpat' . $ colorIndex . ' ' ; } } return $ content ; }
gets rtf code of paragraph

@return  string  rtf code
gets rtf code of paragraph