[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Value 5 * 6 * @package Less 7 * @subpackage tree 8 */ 9 class Less_Tree_Value extends Less_Tree{ 10 11 public $type = 'Value'; 12 public $value; 13 14 public function __construct($value){ 15 $this->value = $value; 16 } 17 18 public function accept($visitor) { 19 $this->value = $visitor->visitArray($this->value); 20 } 21 22 public function compile($env){ 23 24 $ret = array(); 25 $i = 0; 26 foreach($this->value as $i => $v){ 27 $ret[] = $v->compile($env); 28 } 29 if( $i > 0 ){ 30 return new Less_Tree_Value($ret); 31 } 32 return $ret[0]; 33 } 34 35 /** 36 * @see Less_Tree::genCSS 37 */ 38 function genCSS( $output ){ 39 $len = count($this->value); 40 for($i = 0; $i < $len; $i++ ){ 41 $this->value[$i]->genCSS( $output ); 42 if( $i+1 < $len ){ 43 $output->add( Less_Environment::$_outputMap[','] ); 44 } 45 } 46 } 47 48 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |