选择语言 :

 Core_Upload::driver

返回当前上传驱动对象

若驱动为普通文件方式,则返回当前对象

Upload_Driver_Storage Core_Upload::driver( )
返回值
  • Upload_Driver_Storage
File: ./core/classes/upload.class.php
public function driver()
{
    if ($this->config['driver'] == 'default')
    {
        return $this;
    }
    else
    {
        if (!$this->driver)
        {
            $driver = 'Upload_Driver_' . $this->config['driver'];
            if (!class_exists($driver, true))
            {
                throw new Exception(__('Upload class driver :driver not exist.', array(':driver'=>$this->config['driver'])));
            }

            $this->driver = new $driver($this->config['driver_config']);
        }

        $this->driver;

        return $this->driver;
    }
}