<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國際加速解決方案。 廣告
                ```php <?php /** * 結構型模式 * * php裝飾器模式 * 對現有的對象增加功能 * 和適配器的區別:適配器是連接兩個接口,裝飾器是對現有的對象包裝 * * @author TIGERB <https://github.com/TIGERB> * @example 運行 php test.php */ // 注冊自加載 spl_autoload_register('autoload'); function autoload($class) { require dirname($_SERVER['SCRIPT_FILENAME']) . '//..//' . str_replace('\\', '/', $class) . '.php'; } /************************************* test *************************************/ use decorator\DecoratorBrand; use decorator\ShoesSport; use decorator\ShoesSkateboard; try { echo "未加裝飾器之前:\n"; // 生產運動鞋 $shoesSport = new ShoesSport(); $shoesSport->product(); echo "\n--------------------\n"; //----------------------------------- echo "加貼標裝飾器:\n"; // 初始化一個貼商標適配器 $DecoratorBrand = new DecoratorBrand(new ShoesSport()); $DecoratorBrand->_brand = 'nike'; // 生產nike牌運動鞋 $DecoratorBrand->product(); } catch (\Exception $e) { echo $e->getMessage(); }
                  <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>

                              哎呀哎呀视频在线观看