1<?php 2/** 3 * DokuWiki xslfo plugin: Export single pages to PDF via XSL-FO. 4 * 5 * @license GPL 3 (http://www.gnu.org/licenses/gpl.html) 6 * @author Sam Wilson <sam@samwilson.id.au> 7 */ 8 9/** 10 * Ensure that we're running within Dokuwiki. 11 */ 12if (!defined('DOKU_INC')) { 13 die(); 14} 15 16/** 17 * Helper class for static methods. 18 */ 19class helper_plugin_xslfo extends DokuWiki_Plugin { 20 21 /** 22 * Get a list of all XSL files available in the current template. 23 * 24 * @return array List of XSL files 25 */ 26 public static function xsl() { 27 $plugin = array('default.xsl'); 28 $template = preg_grep('|.*\.xsl$|i', scandir(tpl_incdir())); 29 return array_merge($plugin, $template); 30 } 31 32} 33