选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require_once(dirname(__FILE__).'/sfPluginBaseTask.class.php'); /** * Installs a plugin. * * @package symfony * @subpackage task * @author Fabien Potencier * @version SVN: $Id: sfPluginInstallTask.class.php 15796 2009-02-26 09:22:31Z fabien $ */ class sfPluginInstallTask extends sfPluginBaseTask { /** * @see sfTask */ protected function configure() { $this->addArguments(array( new sfCommandArgument('name', sfCommandArgument::REQUIRED, 'The plugin name'), )); $this->addOptions(array( new sfCommandOption('stability', 's', sfCommandOption::PARAMETER_REQUIRED, 'The preferred stability (stable, beta, alpha)', null), new sfCommandOption('release', 'r', sfCommandOption::PARAMETER_REQUIRED, 'The preferred version', null), new sfCommandOption('channel', 'c', sfCommandOption::PARAMETER_REQUIRED, 'The PEAR channel name', null), new sfCommandOption('install_deps', 'd', sfCommandOption::PARAMETER_NONE, 'Whether to force installation of required dependencies', null), new sfCommandOption('force-license', null, sfCommandOption::PARAMETER_NONE, 'Whether to force installation even if the license is not MIT like'), )); $this->aliases = array('plugin-install'); $this->namespace = 'plugin'; $this->name = 'install'; $this->briefDescription = 'Installs a plugin'; $this->detailedDescription = <<logSection('plugin', sprintf('installing plugin "%s"', $arguments['name'])); $options['version'] = $options['release']; unset($options['release']); // license compatible? if (!$options['force-license']) { try { $license = $this->getPluginManager()->getPluginLicense($arguments['name'], $options); } catch (Exception $e) { throw new sfCommandException(sprintf('%s (use --force-license to force installation)', $e->getMessage())); } if (false !== $license) { $temp = trim(str_replace('license', '', strtolower($license))); if (!is_null($license) && !in_array($temp, array('mit', 'bsd', 'lgpl', 'php', 'apache'))) { throw new sfCommandException(sprintf('The license of this plugin "%s" is not MIT like (use --force-license to force installation).', $license)); } } } $this->getPluginManager()->installPlugin($arguments['name'], $options); } }