Example #1
0
 /**
  * Automatically executed after the task action.
  *
  * @return void
  */
 protected function before()
 {
     parent::before();
     if ($this->auto_render === TRUE) {
         if (empty($this->template)) {
             // Generate path to template from class name
             $this->template = CLI_Tasker::class2path($this);
         }
         // Load the template
         $this->template = View::factory($this->template);
     }
 }
Example #2
0
 * @copyright (c) <?php 
echo date('Y');
?>
 Kohana Team
 * @license   http://kohanaframework.org/license
 */
class <?php 
echo $kohana_cli_class;
?>
 extends CLI_Task_Template {

	/**
	 * @var string|object path to template or [View] object
	 */
	protected $template = '<?php 
echo CLI_Tasker::class2path($kohana_cli_class);
?>
';

	/**
	 * @var boolean auto render template
	 **/
	protected $auto_render = TRUE;

	/**
	 * @var array task options as array of option name => default values
	 */
	protected $options = array();

	/**
	 * Automatically executed after the task action.