color = $color; foreach ($color as $k => $v) { $self->$k = $v; } return $self; } /** * @return int */ public function getIndex() { return $this->index; } /** * @param int $index * * @return $this */ public function setIndex($index) { $this->index = $index; return $this; } /** * @return string */ public function getOrigin() { return $this->origin; } /** * @param string $origin * * @return $this */ public function setOrigin($origin) { $this->origin = $origin; return $this; } public function compile() { return $this; } public function genCSS($output) { $css = (new Less_Tree_Call( 'var', [ new Less_Tree_Keyword('--' . $this->getOrigin()), $this->color ], $this->getIndex() ))->toCSS(); $output->add($css); } }