data['name'] = 'apply'; $this->data['props'] = []; } public function __call($name, $arguments) { $name = lcfirst(str_replace('set', '', $name)); $name = Str::snake($name, '_'); $this->data['props'][$name] = $arguments[0]; return $this; } /** * 设置数据 * * @param mixed $data * @return Apply */ public function setData(mixed $data): Apply { $this->data['props']['data'] = $data; return $this; } public function setApi(string $api): Apply { $this->data['props']['api'] = $api; return $this; } }