/** * Setup compiler output formatting * @param ExtendedScssc $compiler * @throws CException */ protected function setupOutputFormatting($compiler) { $formatters = array(self::OUTPUT_FORMATTING_SIMPLE => 'scss_formatter', self::OUTPUT_FORMATTING_NESTED => 'scss_formatter_nested', self::OUTPUT_FORMATTING_COMPRESSED => 'scss_formatter_compressed'); if (isset($formatters[$this->compilerOutputFormatting])) { $compiler->setFormatter($formatters[$this->compilerOutputFormatting]); } else { throw new CException('Unknown output formatting: ' . $this->compilerOutputFormatting); } }
/** * Setup compiler output formatting * @param ExtendedScssc $compiler * @throws CException */ protected function setupOutputFormatting($compiler) { $formatters = array(self::OUTPUT_FORMATTING_NESTED => 'Leafo\\ScssPhp\\Formatter\\Nested', self::OUTPUT_FORMATTING_COMPRESSED => 'Leafo\\ScssPhp\\Formatter\\Compressed', self::OUTPUT_FORMATTING_EXPANDED => 'Leafo\\ScssPhp\\Formatter\\Expanded', self::OUTPUT_FORMATTING_CRUNCHED => 'Leafo\\ScssPhp\\Formatter\\Crunched'); if (isset($formatters[$this->compilerOutputFormatting])) { $compiler->setFormatter($formatters[$this->compilerOutputFormatting]); } else { throw new CException('Unknown output formatting: ' . $this->compilerOutputFormatting); } }