composer package updates
[openemr.git] / vendor / sabberworm / php-css-parser / lib / Sabberworm / CSS / Value / CSSFunction.php
blob3633abc756ce670eadd5cea84415acc1d8c55cc7
1 <?php
3 namespace Sabberworm\CSS\Value;
5 class CSSFunction extends ValueList {
7 private $sName;
9 public function __construct($sName, $aArguments, $sSeparator = ',', $iLineNo = 0) {
10 if($aArguments instanceof RuleValueList) {
11 $sSeparator = $aArguments->getListSeparator();
12 $aArguments = $aArguments->getListComponents();
14 $this->sName = $sName;
15 $this->iLineNo = $iLineNo;
16 parent::__construct($aArguments, $sSeparator, $iLineNo);
19 public function getName() {
20 return $this->sName;
23 public function setName($sName) {
24 $this->sName = $sName;
27 public function getArguments() {
28 return $this->aComponents;
31 public function __toString() {
32 return $this->render(new \Sabberworm\CSS\OutputFormat());
35 public function render(\Sabberworm\CSS\OutputFormat $oOutputFormat) {
36 $aArguments = parent::render($oOutputFormat);
37 return "{$this->sName}({$aArguments})";