Development

/branches/1.4/lib/task/log/sfLogClearTask.class.php

You must first sign up to be able to contribute.

root/branches/1.4/lib/task/log/sfLogClearTask.class.php

Revision 23922, 1.0 kB (checked in by fabien, 5 years ago)

[1.4] removed deprecated stuff

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * Clears log files.
13  *
14  * @package    symfony
15  * @subpackage task
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  */
19 class sfLogClearTask extends sfBaseTask
20 {
21   /**
22    * @see sfTask
23    */
24   protected function configure()
25   {
26     $this->namespace = 'log';
27     $this->name = 'clear';
28     $this->briefDescription = 'Clears log files';
29
30     $this->detailedDescription = <<<EOF
31 The [log:clear|INFO] task clears all symfony log files:
32
33   [./symfony log:clear|INFO]
34 EOF;
35   }
36
37   /**
38    * @see sfTask
39    */
40   protected function execute($arguments = array(), $options = array())
41   {
42     $logs = sfFinder::type('file')->in(sfConfig::get('sf_log_dir'));
43     $this->getFilesystem()->remove($logs);
44   }
45 }
46
Note: See TracBrowser for help on using the browser.