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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [Xunsearch PHP-SDK](http://www.xunsearch.com) v1.4.8 API 參考文檔 # XSCommand [All Packages](#)| [屬性](#)| [方法(函數)](#) | 包 | [XS](#) | |-----|-----| | 繼承關系 | class XSCommand ?[XSComponent](#) | | 版本 | 1.0.0 | | 源代碼 | [sdk/php/lib/XSServer.class.php](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php) | XSCommand 命令對象是與服務端交互的最基本單位, 命令對象可自動轉換為通訊字符串,命令結構參見 C 代碼中的 struct xs_cmd 定義, 頭部長度為 8字節. ### Public 屬性 [隱去繼承來的屬性](#) | 名稱 | 類型 | 描述 | 定義于 | |-----|-----|-----|-----| | [arg](#) | int | 獲取屬性 arg 的值 | XSCommand | | [arg1](#) | int | 參數1取值范圍 0~255, 具體含義根據不同的 CMD 而變化 | XSCommand | | [arg2](#) | int | 參數2取值范圍 0~255, 常用于存儲 value no, 具體參照不同 CMD 而確定 | XSCommand | | [buf](#) | string | 主數據內容, 最長 2GB | XSCommand | | [buf1](#) | string | 輔數據內容, 最長 255字節 | XSCommand | | [cmd](#) | int | 命令代碼通常是預定義常量 CMD_xxx, 取值范圍 0~255 | XSCommand | ### Public 方法 [隱去繼承來的方法](#) | 名稱 | 描述 | 定義于 | |-----|-----|-----| | [__construct()](#) | 構造函數 | XSCommand | | [__get()](#) | 魔術方法 __get | [XSComponent](#) | | [__isset()](#) | 魔術方法 __isset | [XSComponent](#) | | [__set()](#) | 魔術方法 __set | [XSComponent](#) | | [__toString()](#) | 轉換為封包字符串 | XSCommand | | [__unset()](#) | 魔術方法 __unset | [XSComponent](#) | | [getArg()](#) | 獲取屬性 arg 的值 | XSCommand | | [setArg()](#) | 設置屬性 arg 的值 | XSCommand | ### 屬性明細 arg屬性 public int [**getArg**](#)() public void [**setArg**](#)(int $arg) 獲取屬性 arg 的值 arg1屬性 public int **$arg1**; 參數1取值范圍 0~255, 具體含義根據不同的 CMD 而變化 arg2屬性 public int **$arg2**; 參數2取值范圍 0~255, 常用于存儲 value no, 具體參照不同 CMD 而確定 buf屬性 public string **$buf**; 主數據內容, 最長 2GB buf1屬性 public string **$buf1**; 輔數據內容, 最長 255字節 cmd屬性 public int **$cmd**; 命令代碼通常是預定義常量 CMD_xxx, 取值范圍 0~255 ### 方法明細 __construct()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>__construct</b>(mixed $cmd, int $arg1=0, int $arg2=0, string $buf='', string $buf1='')</div></td></tr><tr><td class="paramNameCol">$cmd</td> <td class="paramTypeCol">mixed</td> <td class="paramDescCol">命令類型或命令數組 當類型為 int 表示命令代碼, 范圍是 1~255, 參見 xs_cmd.inc.php 里的定義 當類型為 array 時忽略其它參數, 可包含 cmd, arg1, arg2, buf, buf1 這些鍵值</td></tr><tr><td class="paramNameCol">$arg1</td> <td class="paramTypeCol">int</td> <td class="paramDescCol">參數1, 其值為 0~255, 具體含義視不同 CMD 而確定</td></tr><tr><td class="paramNameCol">$arg2</td> <td class="paramTypeCol">int</td> <td class="paramDescCol">參數2, 其值為 0~255, 具體含義視不同 CMD 而確定, 常用于存儲 value no</td></tr><tr><td class="paramNameCol">$buf</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">字符串內容, 最大長度為 2GB</td></tr><tr><td class="paramNameCol">$buf1</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">字符串內容1, 最大長度為 255字節</td></tr></table> **源碼:**[sdk/php/lib/XSServer.class.php#L62](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L62) (**[顯示](#)**) `public?function?__construct($cmd,?$arg1?=?0,?$arg2?=?0,?$buf?=?'',?$buf1?=?'') { ????if?(is_array($cmd))?{ ????????foreach?($cmd?as?$key?=>?$value)?{ ????????????if?($key?===?'arg'?||?property_exists($this,?$key))?{ ????????????????$this->$key?=?$value; ????????????} ????????} ????}?else?{ ????????$this->cmd?=?$cmd; ????????$this->arg1?=?$arg1; ????????$this->arg2?=?$arg2; ????????$this->buf?=?$buf; ????????$this->buf1?=?$buf1; ????} }` 構造函數 __toString()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public string <b>__toString</b>()</div></td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">用于服務端交互的字符串</td></tr></table> **源碼:**[sdk/php/lib/XSServer.class.php#L83](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L83) (**[顯示](#)**) `public?function?__toString() { ????if?(strlen($this->buf1)?>?0xff)?{ ????????$this->buf1?=?substr($this->buf1,?0,?0xff); ????} ????return?pack('CCCCI',?$this->cmd,?$this->arg1,?$this->arg2,?strlen($this->buf1),?strlen($this->buf))?.?$this->buf?.?$this->buf1; }` 轉換為封包字符串 getArg()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public int <b>getArg</b>()</div></td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">int</td> <td class="paramDescCol">參數值</td></tr></table> **源碼:**[sdk/php/lib/XSServer.class.php#L95](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L95) (**[顯示](#)**) `public?function?getArg() { ????return?$this->arg2?|?($this->arg1?<<?8); }` 獲取屬性 arg 的值 setArg()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>setArg</b>(int $arg)</div></td></tr><tr><td class="paramNameCol">$arg</td> <td class="paramTypeCol">int</td> <td class="paramDescCol">參數值</td></tr></table> **源碼:**[sdk/php/lib/XSServer.class.php#L104](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L104) (**[顯示](#)**) `public?function?setArg($arg) { ????$this->arg1?=?($arg?>>?8)?&?0xff; ????$this->arg2?=?$arg?&?0xff; }` 設置屬性 arg 的值 Copyright ? 2008-2011 by [杭州云圣網絡科技有限公司](http://www.xunsearch.com) All Rights Reserved.
                  <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>

                              哎呀哎呀视频在线观看