/** * Remove model objects of plugin * * @param string $name plugin name */ public static final function removePluginModel($name) { $path = PluginManager::getPluginPath($name); foreach (self::findModelObjects($path . '/model') as $class) { call_user_func(array($class, 'removeStructure')); } }
/** * Path getter * * @return string */ public static final function getPath() { return PluginManager::getPluginPath(static::getName()); }
* This file is part of the BaseProject project. * 2015 * Copyright (c) RENATER */ require_once '../includes/core/init.php'; if (!Config::get('debug')) { die; } if (!array_key_exists('PATH_INFO', $_SERVER)) { die; } // Split request path to get tokens $path = array_filter(explode('/', $_SERVER['PATH_INFO'])); if (!count($path)) { die; } $plugin = array_shift($path); $resource = array_shift($path); $path = PluginManager::getPluginPath($plugin); if (!file_exists($path . $resource)) { die; } switch ($resource) { case 'script.js': header('Content-Type: application/javascript; charset=UTF-8'); break; case 'styles.css': header('Content-Type: text/css; charset=UTF-8'); break; } readfile($path . $resource);