Merge branch 'MDL-63424-37' of git://github.com/lucaboesch/moodle into MOODLE_37_STABLE
[moodle.git] / lib / lessphp / Output.php
blobf1b2b2a999b865ec8504e0f1b567f9355310ff12
1 <?php
3 /**
4 * Parser output
6 * @package Less
7 * @subpackage output
8 */
9 class Less_Output{
11 /**
12 * Output holder
14 * @var string
16 protected $strs = array();
18 /**
19 * Adds a chunk to the stack
21 * @param string $chunk The chunk to output
22 * @param Less_FileInfo $fileInfo The file information
23 * @param integer $index The index
24 * @param mixed $mapLines
26 public function add($chunk, $fileInfo = null, $index = 0, $mapLines = null){
27 $this->strs[] = $chunk;
30 /**
31 * Is the output empty?
33 * @return boolean
35 public function isEmpty(){
36 return count($this->strs) === 0;
40 /**
41 * Converts the output to string
43 * @return string
45 public function toString(){
46 return implode('',$this->strs);