<?php<liu21st@gmail.com>
namespace think\route;
use think\Container;
abstract class Dispatch
{
protected $app;
protected $dispatch;
protected $param;
protected $code;
protected $convert;
public function __construct($dispatch, $param = [], $code = null)
{
$this->app = Container::get('app');
$this->dispatch = $dispatch;
$this->param = $param;
$this->code = $code;
$this->init();
}
protected function init()
{}
public function convert($convert)
{
$this->convert = $convert;
return $this;
}
public function getDispatch()
{
return $this->dispatch;
}
public function getParam()
{
return $this->param;
}
abstract public function run();
}