public function renderAllDivisionsHeader(DataCollection $collection)
{
$division = $collection->getDefaultProperties();
$ua = $division->getUserAgents();
if (empty($ua[0]['properties']) || !is_array($ua[0]['properties'])) {
return $this;
}
$defaultproperties = $ua[0]['properties'];
$properties = array_merge(['PropertyName', 'MasterParent', 'LiteMode', 'Parent'], array_keys($defaultproperties));
$values = [];
foreach ($properties as $property) {
if (!isset($this->outputProperties[$property])) {
$this->outputProperties[$property] = $this->getFilter()->isOutputProperty($property, $this);
}
if (!$this->outputProperties[$property]) {
continue;
}
$values[] = $this->getFormatter()->formatPropertyName($property);
}
fputs($this->file, implode(',', $values) . PHP_EOL);
return $this;
}