示例#1
0
文件: Plugin.php 项目: mvc5/framework
 /**
  * @param array $options
  * @return array
  */
 protected function options(array $options = [])
 {
     return $options + [Arg::HOST => $this->request->host(), Arg::PORT => $this->request->port(), Arg::SCHEME => $this->request->scheme()];
 }
示例#2
0
 /**
  * @param Request $request
  * @param HttpError $error
  * @return mixed
  */
 function __invoke(Request $request, HttpError $error = null)
 {
     return $this->model([Arg::ERROR => $error ?: $request->error()]);
 }