PHPRtfLite::addSection PHP Method

addSection() public method

adds section to rtf document
public addSection ( PHPRtfLite_Container_Section $section = null ) : PHPRtfLite_Container_Section
$section PHPRtfLite_Container_Section
return PHPRtfLite_Container_Section
    public function addSection(PHPRtfLite_Container_Section $section = null)
    {
        if ($section === null) {
            $section = new PHPRtfLite_Container_Section($this);
        }
        $this->_sections[] = $section;
        return $section;
    }

Usage Example

コード例 #1
1
ファイル: SectionTest.php プロジェクト: phprtflite/phprtflite
 public function testWriteRtfCode()
 {
     $section = $this->_rtf->addSection();
     $section->writeRtfCode('This is a Unit Test text!');
     $this->assertEquals(1, $section->countElements());
 }
All Usage Examples Of PHPRtfLite::addSection