企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
find返回数组,get返回对象(在模型里用静态方法调用); get是Model类里的,find是Query类里的,Model里get的实现,最终调用的还是find * * * * * namespace think class Console ~~~ /** * 获取指令 * @param string $name 指令名称 * @return Command * @throws \InvalidArgumentException */ public function get($name) { if (!isset($this->commands[$name])) { throw new \InvalidArgumentException(sprintf('The command "%s" does not exist.', $name)); } $command = $this->commands[$name]; if ($this->wantHelps) { $this->wantHelps = false; /** @var HelpCommand $helpCommand */ $helpCommand = $this->get('help'); $helpCommand->setCommand($command); return $helpCommand; } return $command; } ~~~ get方法传递的数据采用的是显式的,直接输出在URL上;post方法传递数据的方法是隐式的,适用于一些表单数据的提交。(待确定)