Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
style = $style;
}
/**
* Set parent writer.
*
* @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer
*/
public function setParentWriter($writer): void
{
$this->parentWriter = $writer;
}
/**
* Get parent writer.
*
* @return \PhpOffice\PhpWord\Writer\AbstractWriter
*/
public function getParentWriter()
{
return $this->parentWriter;
}
/**
* Get style.
*
* @return array|\PhpOffice\PhpWord\Style\AbstractStyle $style
*/
public function getStyle()
{
if (!$this->style instanceof Style && !is_array($this->style)) {
return '';
}
return $this->style;
}
/**
* Takes array where of CSS properties / values and converts to CSS string.
*
* @param array $css
*
* @return string
*/
protected function assembleCss($css)
{
$pairs = [];
$string = '';
foreach ($css as $key => $value) {
if ($value != '') {
$pairs[] = $key . ': ' . $value;
}
}
if (!empty($pairs)) {
$string = implode('; ', $pairs) . ';';
}
return $string;
}
/**
* Get value if ...
*
* @param null|bool $condition
* @param string $value
*
* @return string
*/
protected function getValueIf($condition, $value)
{
return $condition == true ? $value : '';
}
}