1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-07-05 08:04:26 +03:00
kohana-migrations/classes/minion/task.php

40 lines
675 B
PHP
Raw Normal View History

2010-12-24 17:52:03 +02:00
<?php
/**
* Interface that all minion tasks must implement
*
*/
abstract class Minion_Task {
/**
* Gets the task name for the task
*
* @return string
*/
public function __toString()
{
static $task_name = NULL;
if($task_name === NULL)
{
$task_name = Minion_Util::convert_class_to_task($this);
}
return $task_name;
}
/**
* Get a set of config options that this task can accept
*
* @return array
*/
abstract public function get_config_options();
/**
* Execute the task with the specified set of config
*
* @return boolean TRUE if task executed successfully, else FALSE
*/
abstract public function execute(array $config);
}