Differences Between: [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]
1 <?php 2 3 namespace Sabberworm\CSS\Value; 4 5 abstract class ValueList extends Value { 6 7 protected $aComponents; 8 protected $sSeparator; 9 10 public function __construct($aComponents = array(), $sSeparator = ',', $iLineNo = 0) { 11 parent::__construct($iLineNo); 12 if (!is_array($aComponents)) { 13 $aComponents = array($aComponents); 14 } 15 $this->aComponents = $aComponents; 16 $this->sSeparator = $sSeparator; 17 } 18 19 public function addListComponent($mComponent) { 20 $this->aComponents[] = $mComponent; 21 } 22 23 public function getListComponents() { 24 return $this->aComponents; 25 } 26 27 public function setListComponents($aComponents) { 28 $this->aComponents = $aComponents; 29 } 30 31 public function getListSeparator() { 32 return $this->sSeparator; 33 } 34 35 public function setListSeparator($sSeparator) { 36 $this->sSeparator = $sSeparator; 37 } 38 39 public function __toString() { 40 return $this->render(new \Sabberworm\CSS\OutputFormat()); 41 } 42 43 public function render(\Sabberworm\CSS\OutputFormat $oOutputFormat) { 44 return $oOutputFormat->implode($oOutputFormat->spaceBeforeListArgumentSeparator($this->sSeparator) . $this->sSeparator . $oOutputFormat->spaceAfterListArgumentSeparator($this->sSeparator), $this->aComponents); 45 } 46 47 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body