See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]
1 <?php 2 3 namespace Sabberworm\CSS\Value; 4 5 use Sabberworm\CSS\OutputFormat; 6 7 class CSSFunction extends ValueList 8 { 9 /** 10 * @var string 11 */ 12 protected $sName; 13 14 /** 15 * @param string $sName 16 * @param RuleValueList|array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string> $aArguments 17 * @param string $sSeparator 18 * @param int $iLineNo 19 */ 20 public function __construct($sName, $aArguments, $sSeparator = ',', $iLineNo = 0) 21 { 22 if ($aArguments instanceof RuleValueList) { 23 $sSeparator = $aArguments->getListSeparator(); 24 $aArguments = $aArguments->getListComponents(); 25 } 26 $this->sName = $sName; 27 $this->iLineNo = $iLineNo; 28 parent::__construct($aArguments, $sSeparator, $iLineNo); 29 } 30 31 /** 32 * @return string 33 */ 34 public function getName() 35 { 36 return $this->sName; 37 } 38 39 /** 40 * @param string $sName 41 * 42 * @return void 43 */ 44 public function setName($sName) 45 { 46 $this->sName = $sName; 47 } 48 49 /** 50 * @return array<int, RuleValueList|CSSFunction|CSSString|LineName|Size|URL|string> 51 */ 52 public function getArguments() 53 { 54 return $this->aComponents; 55 } 56 57 /** 58 * @return string 59 */ 60 public function __toString() 61 { 62 return $this->render(new OutputFormat()); 63 } 64 65 /** 66 * @return string 67 */ 68 public function render(OutputFormat $oOutputFormat) 69 { 70 $aArguments = parent::render($oOutputFormat); 71 return "{$this->sName}({$aArguments})"; 72 } 73 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body