<?php
/**
 * 
 * @author KevinXie
 *
 */
class Scrontab_Loadtasks
{
    private $handle;
    public function __construct($type,$params="")
    {
        switch($type){
            case "file":
                $this->handle =  new Scrontab_Loadtasksbyfile($params);
                break;
            default:
                $this->handle =  new Scrontab_Loadtasksbyfile($params);
                break;
        }
    }

    /**
     * 获取需要执行的任务
     * @return array
     */
    public function getTasks()
    {
        return $this->handle->getTasks();
    }

    /**
     * 重载任务配置
     */
    public function reloadTasks()
    {
        $this->handle->reloadTasks();
    }
}