1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-07-02 22:55:03 +03:00
kohana-migrations/classes/minion/task.php
2010-12-24 15:52:03 +00:00

40 lines
675 B
PHP

<?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);
}