添加自定义代码
添加自定义代码
本页面介绍如何为您的 PHP SDK 添加自定义逻辑、方法和依赖项。
Before getting started, read about how Fern SDKs use custom code and learn about the
.fernignore file.添加自定义逻辑
开始添加自定义代码:
添加自定义 SDK 方法
Fern also allows you to add custom methods to the SDK itself (e.g.
client.my_method() ) by inheriting the Fern generated client and then
extending it.
添加自定义依赖项
要添加您的自定义代码所需的包,请使用 composerJson 配置选项更新您的 generators.yml。
generators.yml