Location: PHPKode > projects > GnomePHP > peec-GnomePHP-b5a360b/gnomephp/appcommand/CleanCommand.php
<?php
namespace gnomephp\appcommand;


use Symfony\Component\Console\Input\InputArgument,
Symfony\Component\Console\Input\InputOption,
Symfony\Component\Console,
Doctrine\ORM\Tools\Console\MetadataFilter;

/**
 * Command to create a new application
 */
class CleanCommand extends AbstractCommand
{
	/**
	 * @see Console\Command\Command
	 */
	protected function configure()
	{
		$this
		->setName('app:clean')
		->setDescription('Cleans all cached resources from the application.')
		->setHelp(<<<EOT
This command will clean all the cached data from this specific application.
EOT
                );
	}

	/**
	 * @see Console\Command\Command
	 */
	protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output){
		$output->write(PHP_EOL . 'Clearing cache directory ... ' . GNOME_APP_NS . PHP_EOL);
		
		rmdir($this->getAppPath() . DIRECTORY_SEPARATOR . 'cache');
		
		mkdir($this->getAppPath() . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'doctrine' . DIRECTORY_SEPARATOR . 'Proxies');
		
		
		$output->write(PHP_EOL . 'Cache directory cleared.' . GNOME_APP_NS . PHP_EOL);
	}

	
	
}
Return current item: GnomePHP