Development

/branches/1.2/lib/task/sfCommandApplicationTask.class.php

You must first sign up to be able to contribute.

root/branches/1.2/lib/task/sfCommandApplicationTask.class.php

Revision 19112, 1.3 kB (checked in by fabien, 5 years ago)

[1.1, 1.2, 1.3] added missing PHPDoc

  • 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) 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  * Base class for tasks that depends on a sfCommandApplication object.
13  *
14  * @package    symfony
15  * @subpackage task
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  */
19 abstract class sfCommandApplicationTask extends sfTask
20 {
21   protected
22     $commandApplication = null;
23
24   /**
25    * Sets the command application instance for this task.
26    *
27    * @param sfCommandApplication $commandApplication A sfCommandApplication instance
28    */
29   public function setCommandApplication(sfCommandApplication $commandApplication = null)
30   {
31     $this->commandApplication = $commandApplication;
32   }
33
34   /**
35    * @see sfTask
36    */
37   public function log($messages)
38   {
39     if (is_null($this->commandApplication) || $this->commandApplication->isVerbose())
40     {
41       parent::log($messages);
42     }
43   }
44
45   /**
46    * @see sfTask
47    */
48   public function logSection($section, $message, $size = null, $style = 'INFO')
49   {
50     if (is_null($this->commandApplication) || $this->commandApplication->isVerbose())
51     {
52       parent::logSection($section, $message, $size, $style);
53     }
54   }
55 }
56
Note: See TracBrowser for help on using the browser.