$cssp->global_constants['FILEPATH'] = ''; } // Get plugin settings for the before parse hook $plugin_list = array(); $found = false; foreach ($cssp->code as $line) { if (!$found) { if (preg_match('/^[\\s\\t]*@turbine/i', $line) == 1) { $found = true; } } else { preg_match('~^\\s+plugins:(.*?)(?://|$)~', $line, $matches); 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
} else { $cssp->global_constants['FILEPATH'] = ''; } // Get plugin list for the before parse hook $found = false; foreach ($cssp->code as $line) { if (!$found) { if (preg_match('/^[\\s\\t]*@turbine/i', $line) == 1) { $found = true; } } else { preg_match('~^\\s+plugins:(.*?)(?://|$)~', $line, $matches); if (count($matches) == 2) { $matches[1] = rtrim($matches[1], ';'); // Strip semicolons $plugin_list = array_merge($plugin_list, $cssp->tokenize($matches[1], ',')); break; } } } $plugins_used = array_unique(array_merge($plugins_used, $plugin_list)); // Get plugin options $plugin_settings = array(); $found = false; foreach ($cssp->code as $line) { if (!$found) { if (preg_match('/^[\\s\\t]*@turbine/i', $line) == 1) { $found = true; } } else { if ($line == '') {