/** * Initializes static class configuration. * * Options: * * cache - Enable template pre-compilation on disk. * * cache_dir - Directory to store pre-compiled templates. * * cleanup - Cleanup HTML output removing comments, spaces and blanks. * * debug - Enable dumping debug information. * * debug_output - Switch output to TPL-debug mode. * * Default values: * <code> * $options = array( * 'cache' => false, * 'cache_dir' => '', * 'cleanup' => false, * 'debug' => false, * 'debug_output' => false, * ); * </code> * * @param array $options CoTemplate options */ public static function init($options = array()) { $defaults = array('cache' => false, 'cache_dir' => '', 'cleanup' => false, 'debug' => false, 'debug_output' => false); $options = array_merge($defaults, $options); self::$cache_enabled = $options['cache']; self::$cache_dir = $options['cache_dir']; self::$debug_mode = $options['debug']; self::$debug_output = $options['debug_output']; Cotpl_data::init($options['cleanup']); }