<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] ## 安裝 ``` composer require psr/http-factory ``` ## 接口 <details> <summary>Psr\Http\Message\RequestFactoryInterface</summary> ``` namespace Psr\Http\Message; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\UriInterface; interface RequestFactoryInterface { /** * 創建一個新的請求 * * @param string $method 請求使用的 HTTP 方法。 * @param UriInterface|string $uri 請求關聯的 URI。 */ public function createRequest(string $method, $uri): RequestInterface; } ``` </details> <br /> <details> <summary>Psr\Http\Message\ResponseFactoryInterface</summary> ``` namespace Psr\Http\Message; use Psr\Http\Message\ResponseInterface; interface ResponseFactoryInterface { /** * 創建一個響應對象。 * * @param int $code HTTP 狀態碼,默認值為 200。 * @param string $reasonPhrase 與狀態碼關聯的原因短語。如果未提供,實現 **可能** 使用 HTTP 規范中建議的值。 */ public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface; } ``` </details> <br /> <details> <summary>Psr\Http\Message\ServerRequestFactoryInterface</summary> ``` namespace Psr\Http\Message; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\UriInterface; interface ServerRequestFactoryInterface { /** * 創建一個服務端請求。 * * 注意服務器參數要精確的按給定的方式獲取 - 不執行給定值的解析或處理。 * 尤其是不要從中嘗試獲取 HTTP 方法或 URI,這兩個信息一定要通過函數參數明確給出。 * * @param string $method 與請求關聯的 HTTP 方法。 * @param UriInterface|string $uri 與請求關聯的 URI。 * @param array $serverParams 用來生成請求實例的 SAPI 參數。 */ public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface; } ``` </details> <br /> <details> <summary>Psr\Http\Message\StreamFactoryInterface</summary> ``` namespace Psr\Http\Message; use Psr\Http\Message\StreamInterface; interface StreamFactoryInterface { /** * 從字符串創建一個流。 * * 流 **應該** 使用臨時資源來創建。 * * @param string $content 用于填充流的字符串內容。 */ public function createStream(string $content = ''): StreamInterface; /** * 通過現有文件創建一個流。 * * 文件 **必須** 用給定的模式打開文件,該模式可以是 `fopen` 函數支持的任意模式。 * * `$filename` **可能** 是任意被 `fopen()` 函數支持的字符串。 * * @param string $filename 用作流基礎的文件名或 URI。 * @param string $mode 用于打開基礎文件名或流的模式。 * * @throws \RuntimeException 如果文件無法被打開時拋出。 * @throws \InvalidArgumentException 如果模式無效會被拋出。 */ public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface; /** * 通過現有資源創建一個流。 * * 流必須是可讀的并且可能是可寫的。 * * @param resource $resource 用作流的基礎的 PHP 資源。 */ public function createStreamFromResource($resource): StreamInterface; } ``` </details> <br /> <details> <summary>Psr\Http\Message\UploadedFileFactoryInterface</summary> ``` namespace Psr\Http\Message; use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UploadedFileInterface; interface UploadedFileFactoryInterface { /** * 創建一個上傳文件接口的對象。 * * 如果未提供大小,將通過檢查流的大小來確定。 * * @link http://php.net/manual/features.file-upload.post-method.php * @link http://php.net/manual/features.file-upload.errors.php * * @param StreamInterface $stream 表示上傳文件內容的流。 * @param int $size 文件的大小,以字節為單位。 * @param int $error PHP 上傳文件的錯誤碼。 * @param string $clientFilename 如果存在,客戶端提供的文件名。 * @param string $clientMediaType 如果存在,客戶端提供的媒體類型。 * * @throws \InvalidArgumentException 如果文件資源不可讀時拋出異常。 */ public function createUploadedFile( StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null ): UploadedFileInterface; } ``` </details> <br /> <details> <summary>Psr\Http\Message\UriFactoryInterface</summary> ``` namespace Psr\Http\Message; use Psr\Http\Message\UriInterface; interface UriFactoryInterface { /** * 創建一個 URI。 * * @param string $uri 要解析的 URI。 * * @throws \InvalidArgumentException 如果給定的 URI 無法被解析時拋出。 */ public function createUri(string $uri = '') : UriInterface; } ``` </details> <br />
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看