// +---------------------------------------------------------------------- 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; } 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(); }