Esempio n. 1
0
         if (count($matches) == 2) {
             $matches[1] = rtrim($matches[1], ';');
             // Strip semicolons
             $plugin_list = $cssp->tokenize($matches[1], ',');
             break;
         }
     }
 }
 // Check if there is any plugin in the list that doesn't actually exist
 $plugin_diff = array_diff($plugin_list, $plugins_available);
 if (!empty($plugin_diff)) {
     $cssp->report_error('The following plugins are not present in your Turbine installation: ' . ucfirst(implode(', ', $plugin_diff)));
 }
 $cssp->set_indention_char();
 // Set the character(s) used for code indention
 $cssp->apply_plugins('before_parse', $plugin_list, $cssp->code);
 // Apply plugins for before parse
 $cssp->parse();
 // Parse the code
 $cssp->apply_plugins('before_compile', $plugin_list, $cssp->parsed);
 // Apply plugins for before compile
 $cssp->compile();
 // Do the Turbine magic
 $cssp->apply_plugins('before_glue', $plugin_list, $cssp->parsed);
 // Apply plugins for before glue
 // Set compression mode
 if (isset($cssp->parsed['global']['@turbine']['compress'][0])) {
     $compress = (bool) $cssp->parsed['global']['@turbine']['compress'][0];
 } else {
     $compress = (bool) $cssp->config['compress'];
 }