Beispiel #1
0
 public function joinFiles($sections = array(), $type = 'css')
 {
     $task = new FD40_Stylesheet_Task("Joining {$type} sections.");
     $content = '';
     foreach ($sections as $section) {
         $sectionFile = $this->stylesheet->file($section, $type);
         if (!JFile::exists($sectionFile)) {
             return $task->reject("Missing minified section file '{$sectionFile}'.");
         }
         $sectionContent = JFile::read($sectionFile);
         if ($sectionContent === false) {
             return $task->reject("Unable to read minified section file '{$sectionFile}'.");
         }
         $content .= $sectionContent;
     }
     $task->result = $content;
     return $task->resolve();
 }