<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 參考文檔 # XSComponent [All Packages](#)| [方法(函數)](#) | 包 | [XS](#) | |-----|-----| | 繼承關系 | class XSComponent | | 子類 | [XS](#), [XSCommand](#), [XSServer](#) | | 版本 | 1.0.0 | | 源代碼 | [sdk/php/lib/XS.class.php](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XS.class.php) | XS 組件基類封裝一些魔術方法, 以實現支持模擬屬性 模擬屬性通過定義讀取函數, 寫入函數來實現, 允許兩者缺少其中一個這類屬性可以跟正常定義的屬性一樣存取, 但是這類屬性名稱不區分大小寫. 例: ~~~ $a = $obj->text; // $a 值等于 $obj->getText() 的返回值 $obj->text = $a; // 等同事調用 $obj->setText($a) ~~~ ### Public 方法 [隱去繼承來的方法](#) | 名稱 | 描述 | 定義于 | |-----|-----|-----| | [__get()](#) | 魔術方法 __get | XSComponent | | [__isset()](#) | 魔術方法 __isset | XSComponent | | [__set()](#) | 魔術方法 __set | XSComponent | | [__unset()](#) | 魔術方法 __unset | XSComponent | ### 方法明細 __get()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public mixed <b>__get</b>(string $name)</div></td></tr><tr><td class="paramNameCol">$name</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">屬性名稱</td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">mixed</td> <td class="paramDescCol">屬性值</td></tr></table> **源碼:**[sdk/php/lib/XS.class.php#L182](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XS.class.php#L182) (**[顯示](#)**) `public?function?__get($name) { ????$getter?=?'get'?.?$name; ????if?(method_exists($this,?$getter))?{ ????????return?$this->$getter(); ????} ????//?throw?exception ????$msg?=?method_exists($this,?'set'?.?$name)???'Write-only'?:?'Undefined'; ????$msg?.=?'?property:?'?.?get_class($this)?.?'::$'?.?$name; ????throw?new?XSException($msg); }` 魔術方法 __get取得模擬屬性的值, 內部實際調用 getXxx 方法的返回值 __isset()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public bool <b>__isset</b>(string $name)</div></td></tr><tr><td class="paramNameCol">$name</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">屬性名稱</td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">bool</td> <td class="paramDescCol">若存在為 true, 反之為 false</td></tr></table> **源碼:**[sdk/php/lib/XS.class.php#L221](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XS.class.php#L221) (**[顯示](#)**) `public?function?__isset($name) { ????return?method_exists($this,?'get'?.?$name); }` 魔術方法 __isset判斷模擬屬性是否存在并可讀取 __set()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>__set</b>(string $name, mixed $value)</div></td></tr><tr><td class="paramNameCol">$name</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">屬性名稱</td></tr><tr><td class="paramNameCol">$value</td> <td class="paramTypeCol">mixed</td> <td class="paramDescCol">屬性值</td></tr></table> **源碼:**[sdk/php/lib/XS.class.php#L202](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XS.class.php#L202) (**[顯示](#)**) `public?function?__set($name,?$value) { ????$setter?=?'set'?.?$name; ????if?(method_exists($this,?$setter))?{ ????????return?$this->$setter($value); ????} ????//?throw?exception ????$msg?=?method_exists($this,?'get'?.?$name)???'Read-only'?:?'Undefined'; ????$msg?.=?'?property:?'?.?get_class($this)?.?'::$'?.?$name; ????throw?new?XSException($msg); }` 魔術方法 __set設置模擬屬性的值, 內部實際是調用 setXxx 方法 __unset()方法 <table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>__unset</b>(string $name)</div></td></tr><tr><td class="paramNameCol">$name</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">屬性名稱</td></tr></table> **源碼:**[sdk/php/lib/XS.class.php#L231](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XS.class.php#L231) (**[顯示](#)**) `public?function?__unset($name) { ????$this->__set($name,?null); }` 魔術方法 __unset刪除、取消模擬屬性, 相當于設置屬性值為 null 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>

                              哎呀哎呀视频在线观看