PHPRtfLite::addSection PHP Метод

addSection() публичный Метод

adds section to rtf document
public addSection ( PHPRtfLite_Container_Section $section = null ) : PHPRtfLite_Container_Section
$section PHPRtfLite_Container_Section
Результат 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
 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