registerParFormat() public méthode

registers the par format in color table
public registerParFormat ( PHPRtfLite_ParFormat $parFormat )
$parFormat PHPRtfLite_ParFormat
Exemple #1
0
 /**
  * constructor
  *
  * @param PHPRtfLite            $rtf
  * @param string                $text
  * @param PHPRtfLite_Font       $font
  * @param PHPRtfLite_ParFormat  $parFormat
  */
 public function __construct(PHPRtfLite $rtf, $text, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null)
 {
     if ($font) {
         $rtf->registerFont($font);
     }
     if ($parFormat) {
         $rtf->registerParFormat($parFormat);
     }
     $this->_rtf = $rtf;
     $this->_text = $text;
     $this->_font = $font;
     $this->_parFormat = $parFormat;
 }
Exemple #2
0
 /**
  * sets paragraph format
  *
  * @param PHPRtfLite_ParFormat $parFormat
  */
 public function setParFormat(PHPRtfLite_ParFormat $parFormat)
 {
     $this->_rtf->registerParFormat($parFormat);
     $this->_parFormat = $parFormat;
 }