<?php
/**
 * 计划任务公共类
 * @Copyright (C) 2016 汉潮 All rights reserved.
 * @License http://www.hanchao9999.com
 * @Author xiaoq <570035208@qq.com>
 */
 
namespace Common\Vendor;
/**
 * 快递查询公共类
 * @author xiaogg <xiaogg@sina.cn>
 */
class Cron{
    static $class;
    /**
     * 构造方法，用于实例化一个处理对象
     * @param string $classname 要使用的类库
     */
    public function __construct($classname = ''){
        /* 判断调用库的类型 */
        if(empty($classname))return false;
        $express_config=M('Cron')->where("classname='".$classname."'")->field(true)->find();
        if(empty($express_config))return false;       
        /* 引入处理库 */
        $classfullname  =    "Common\\Vendor\\Cron\\".$classname;
        $this->class = new $classfullname($express_config);
    }
    public function __call($method,$data) {
       if(method_exists($this->class,$method))return $this->class->$method($data);
    }
}