Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 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: sfLogClearTask.class.php 23922 2009-11-14 14:58:38Z fabien $
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
}