$classname, 'path'=>$classPath); } /** * * @param String $codename * @return Acp_Bib_IStyle */ public static function resolveBibStyle($codename) { if (isset(self::$styles[$codename])) { require_once self::$styles[$codename]['path']; return new self::$styles[$codename]['class']; } else return null; } public static function getBibStyles() { return array_keys(self::$styles); } /* AJAX */ public static function ajaxHandler() { if (isset($_POST['class']) && !empty($_POST['class'])) { $args = $_POST; unset($args['class']); $method = 'ajax'; if (isset($_POST['method']) && !empty($_POST['method'])) { $method = $_POST['method']; unset($_POST['method']); } Acp::loadClass($_POST['class']); $o = new $_POST['class'](); $o->$method($args); } exit; } /* MISC */ public static function version() { return '3.0'; } public static function author() { return 'Benjamin Sommer'; } public static function website() { return 'http://academic-press.benjaminsommer.com'; } private static $api; private static $styles = array(); }