Browscap\Writer\WriterCollection::renderSectionBody PHP Метод

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

renders all found useragents into a string
public renderSectionBody ( array $section, DataCollection $collection, array $sections = [], string $sectionName = '' ) : WriterCollection
$section array
$collection Browscap\Data\DataCollection
$sections array
$sectionName string
Результат WriterCollection
    public function renderSectionBody(array $section, DataCollection $collection, array $sections = [], $sectionName = '')
    {
        foreach ($this->writers as $writer) {
            $writer->renderSectionBody($section, $collection, $sections, $sectionName);
        }
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * tests rendering the body of one section
  *
  * @group writer
  * @group sourcetest
  */
 public function testRenderSectionBody()
 {
     $section = array('Comment' => 1, 'Win16' => true, 'Platform' => 'bcd');
     $mockCollection = $this->getMock('\\Browscap\\Data\\DataCollection', array(), array(), '', false);
     $mockWriter = $this->getMock('\\Browscap\\Writer\\CsvWriter', array(), array(), '', false);
     self::assertSame($this->object, $this->object->addWriter($mockWriter));
     self::assertSame($this->object, $this->object->renderSectionBody($section, $mockCollection));
 }
All Usage Examples Of Browscap\Writer\WriterCollection::renderSectionBody