<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                系統為一些常用的操作方法封裝了助手函數,便于使用,包含如下: | 助手函數 | 描述 | | --- | --- | | abort | 中斷執行并發送HTTP狀態碼 | | app | 快速獲取容器中的實例 支持依賴注入 | | bind | 快速綁定對象實例 | | cache | 緩存管理 | | class\_basename | 獲取類名(不包含命名空間) | | class\_uses\_recursive | 獲取一個類里所有用到的trait | | config | 獲取和設置配置參數 | | cookie | Cookie管理 | | download | 獲取\\think\\response\\Download對象實例 | | dump | 瀏覽器友好的變量輸出 | | env | 獲取環境變量 | | event | 觸發事件 | | halt | 變量調試輸出并中斷執行 | | input | 獲取輸入數據 支持默認值和過濾 | | invoke | 調用反射執行callable 支持依賴注入 | | json | JSON數據輸出 | | jsonp | JSONP數據輸出 | | lang | 獲取語言變量值 | | parse\_name | 字符串命名風格轉換 | | redirect | 重定向輸出 | | request | 獲取當前Request對象 | | response | 實例化Response對象 | | session | Session管理 | | token | 生成表單令牌輸出 | | trace | 記錄日志信息 | | trait\_uses\_recursive | 獲取一個trait里所有引用到的trait | | url | Url生成 | | validate | 實例化驗證器 | | view | 渲染模板輸出 | | display | 渲染內容輸出 | | xml | XML數據輸出 | | app\_path | 當前應用目錄 | | base\_path | 應用基礎目錄 | | config\_path | 應用配置目錄 | | public\_path | web根目錄 | | root\_path | 應用根目錄 | | runtime\_path | 應用運行時目錄 | vendor\topthink\framework\src\helper.php ``` //中斷執行并發送HTTP狀態碼 abort($code, string $message = '', array $header = []) //快速獲取容器中的實例 支持依賴注入 app(string $name = '', array $args = [], bool $newInstance = false):object|App //快速綁定對象實例 bind($abstract, $concrete = null):Container //緩存管理 cache(string $name = null, $value = '', $options = null, $tag = null):mixed //獲取和設置配置參數 config($name = '', $value = null):mixed //Cookie管理 cookie(string $name, $value = '', $option = null):mixed //獲取\\think\\response\\Download對象實例 download(string $filename, string $name = '', bool $content = false, int $expire = 180):\think\response\File //瀏覽器友好的變量輸出 dump(...$vars):void //獲取環境變量 env(string $name = null, $default = null):mixed //觸發事件 event($event, $args = null):mixed //變量調試輸出并中斷執行 在tp中替代die和exit halt(...$vars) //獲取輸入數據 支持默認值和過濾 input(string $key = '', $default = null, $filter = ''):mixed //調用反射執行callable 支持依賴注入 invoke($call, array $args = []):mixed //JSON數據輸出 json($data = [], $code = 200, $header = [], $options = []): Json //JSONP數據輸出 jsonp($data = [], $code = 200, $header = [], $options = []): Jsonp //獲取語言變量值 lang(string $name, array $vars = [], string $lang = ''):mixed //字符串命名風格轉換 parse_name(string $name, int $type = 0, bool $ucfirst = true): string //重定向輸出 redirect(string $url = '', int $code = 302): \think\response\Redirect //獲取當前Request對象 request(): \think\Request //實例化Response對象 response($data = '', $code = 200, $header = [], $type = 'html'): Response //Session管理 session($name = '', $value = ''):mixed //生成表單令牌輸出 token(string $name = '__token__', string $type = 'md5'): string //生成令牌隱藏表單 token_field(string $name = '__token__', string $type = 'md5'): string //生成令牌meta token_meta(string $name = '__token__', string $type = 'md5'): string //記錄日志信息 trace($log = '[think]', string $level = 'log') //Url生成 url(string $url = '', array $vars = [], $suffix = true, $domain = false): UrlBuild //實例化驗證器 validate($validate = '', array $message = [], bool $batch = false, bool $failException = true): Validate //渲染模板輸出 view(string $template = '', $vars = [], $code = 200, $filter = null): View //渲染內容輸出 display(string $content, $vars = [], $code = 200, $filter = null): View //XML數據輸出 xml($data = [], $code = 200, $header = [], $options = []): Xml //當前應用目錄 app_path($path = ''):string //應用基礎目錄 base_path($path = ''):string //應用配置目錄 config_path($path = ''):string 獲取應用配置目錄 //web根目錄 public_path($path = ''):string //應用運行時目錄 runtime_path($path = ''):string //應用根目錄 root_path($path = ''):string ``` vendor\topthink\think-helper\src\helper.php ``` //按條件拋異常 throw_if($condition, $exception, ...$parameters):mixed //按條件拋異常 throw_unless($condition, $exception, ...$parameters):mixed //對一個值調用給定的閉包,然后返回該值 tap($value, $callback = null):mixed //返回給定值的默認值。 value($value):mixed //Create a collection from the given value. collect($value = null):Collection //Fill in data where it's missing. data_fill(&$target, $key, $value):mixed //Get an item from an array or object using "dot" notation. data_get($target, $key, $default = null):mixed //Set an item on an array or object using dot notation. data_set(&$target, $key, $value, $overwrite = true):mixed //獲取一個trait里所有引用到的trait trait_uses_recursive(string $trait): array //獲取類名(不包含命名空間) class_basename($class): string //取一個類里所有用到的trait,包括父類的 class_uses_recursive($class): array ``` > 可以在應用的公共函數文件中重寫上面這些助手函數。
                  <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>

                              哎呀哎呀视频在线观看