* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Disables an application in a given environment. * * @package symfony * @subpackage task * @author Fabien Potencier * @version SVN: $Id: sfProjectDisableTask.class.php 9890 2008-06-26 11:35:01Z fabien $ */ class sfProjectDisableTask extends sfBaseTask { /** * @see sfTask */ protected function configure() { $this->addArguments(array( new sfCommandArgument('application', sfCommandArgument::REQUIRED, 'The application name'), new sfCommandArgument('env', sfCommandArgument::REQUIRED, 'The environment name'), )); $this->aliases = array('disable'); $this->namespace = 'project'; $this->name = 'disable'; $this->briefDescription = 'Disables an application in a given environment'; $this->detailedDescription = <<logSection('enable', sprintf('%s [%s] is currently DISABLED', $app, $env)); } else { $this->getFilesystem()->touch($lockFile); $this->logSection('enable', sprintf('%s [%s] has been DISABLED', $app, $env)); } } }