首頁 後端開發 php教程 PHP設計模式之狀態模式定義與用法

PHP設計模式之狀態模式定義與用法

Apr 09, 2018 pm 04:43 PM
php 用法 設計模式

這篇文章主要為大家介紹了PHP設計模式之狀態模式定義與用法,有需要的朋友可以參考一下

本文實例講述了PHP設計模式之狀態模式定義與用法。分享給大家供大家參考,具體如下:

什麼是狀態設計模式

當一個物件的內在狀態改變時允許改變其行為,這個物件看起來像是改變了其類別。

狀態模式主要解決的是當控制一個物件狀態的條件式過於複雜時的情況。把狀態的判斷邏輯轉移到表示不同狀態的一系列類別中,可以把複雜的判斷邏輯簡化。

什麼時候使用狀態模式

在物件中頻繁改變非常依賴條件語句。 就其本身來說, 條件語句本身沒有什麼問題(如switch語句或帶else子句的語句),不過, 如果選項太多, 以到程序開始出現混亂, 或者增加或改變選項需要花費太多時間,甚至成為一種負擔, 這就出現了問題

對於狀態設計模式, 每個狀態都有自己的具體類, 它們實現一個公共接口. 我們不用查看對象的控制流, 而是從另一個角度來考慮, 即物件的狀態.

狀態機是一個模型, 其重點包括不同的狀態, 一個狀態到另一個狀態的變遷, 以及導致狀態改變的觸發器.

以開燈關燈為例子, 狀態模型的本質分為3點:

①狀態(關燈和開燈)
②變遷(從關燈到開燈,以及從開燈到關燈)
③觸發器(燈開關)

所以狀態模式都需要一個參與者來追蹤物件所處的狀態. 以Light為例, Light需要知道目前狀態是什麼.

範例:開燈關燈

#Light.php

##

<?php
class Light
{
  private $offState; //关闭状态
  private $onState;  //开启状态
  private $currentState; //当前状态
  public function __construct()
  {
    $this->offState = new OffState($this);
    $this->onState = new OnState($this);
    //开始状态为关闭状态Off
    $this->currentState = $this->offState;
  }
  //调用状态方法触发器
  public function turnLightOn()
  {
    $this->currentState->turnLightOn();
  }
  public function turnLightOff()
  {
    $this->currentState->turnLightOff();
  }
  //设置当前状态
  public function setState(IState $state)
  {
    $this->currentState = $state;
  }
  //获取状态
  public function getOnState()
  {
    return $this->onState;
  }
  public function getOffState()
  {
    return $this->offState;
  }
}
登入後複製

在建構函式中, Light實例化IState實作的兩個實例-----一個對應關, 一個對應開

$this->offState = new OffState($this);
$this->onState = new OnState($this);
登入後複製

#這個實例化過程用到了一種遞歸, 稱為自引用(self-referral)

#建構子參數中的實參寫為$this, 這是Light類別本身的參考. 狀態類別希望接收一個Light類別實例做參數,.

setState方法是為了設定一個當前狀態需要一個狀態物件作為實參, 一旦觸發一個狀態, 這個狀態就會向Light類別發送訊息, 指定當前狀態.

狀態實例

IState介面

#IState.php

##
<?php
interface IState
{
  public function turnLightOn();
  public function turnLightOff();
}
登入後複製

該介面的實作類別

OnState.php

#
<?php
class OnState implements IState
{
  private $light;
  public function __construct(Light $light)
  {
    $this->light = $light;
  }
  public function turnLightOn()
  {
    echo "灯已经打开了->不做操作<br />";
  }
  public function turnLightOff()
  {
    echo "灯关闭!看不见帅哥chenqionghe了!<br />";
    $this->light->setState($this->light->getOffState());
  }
}
登入後複製

OffState.php

<?php
class OffState implements IState
{
  private $light;
  public function __construct(Light $light)
  {
    $this->light = $light;
  }
  public function turnLightOn()
  {
    echo "灯打开!可以看见帅哥chenqionghe了!<br />";
    $this->light->setState($this->light->getOnState());
  }
  public function turnLightOff()
  {
    echo "灯已经关闭了->不做操作<br />";
  }
}
登入後複製

預設狀態是OffState, 它必須實作IState方法turnLightOn和turnLightOff, Light呼叫turnLightOn方法, 會顯示(燈開啟!可以看見帥哥chenqionghe了), 然後將OnState設置為當前狀態, 不過,如果是調用OffState的turnLightOff方法, 就只有提示燈已經被關閉了不會有其他動作.

#客戶

Client的所有請求都是透過Light發出, Client和任何狀態類別之間都沒有直接連接, 包括IState介面.下面的Client顯示了觸發兩個狀態中所有方法的請求.

Client.php

<?php
function __autoload($class_name)
{
  include_once $class_name.&#39;.php&#39;;
}
class Client
{
  private $light;
  public function __construct()
  {
    $this->light = new Light();
    $this->light->turnLightOn();
    $this->light->turnLightOn();
    $this->light->turnLightOff();
    $this->light->turnLightOff();
  }
}
$worker = new Client();
登入後複製

#增加狀態

對所有的設計模式來說,很重要的一個方面是: 利用這些設計模式可以很容易地做出修改. 與其他模式一樣,狀態模式也很易於更新和改變. 下面在這個燈的示例上再加兩個狀態:更亮(Brighter)和最亮(Brightest)

現在變成了4個狀態, 序列有所改變. '關'(off)狀態只能變到"開"(on)狀態, on狀態不能變到off狀態.on狀態只能變到"更亮"(brighter)狀態和"最亮"(brightest)狀態. 只能最亮狀態才可能變到關狀態.

改變介面

要改變的第一個參與者是介面IState, 這個介面中必須指定對應的方法, 可以用來遷移到brighter和brightest狀態.

IState.php

<?php
interface IState
{
  public function turnLightOn();
  public function turnLightOff();
  public function turnBrighter();
  public function turnBrightest();
}
登入後複製

#現在所有狀態類別都必須包含這4個方法, 它們都需要結合到Light類別中.

改變狀態

狀態設計模式中有改變時, 這些新增的改變會對模式整體的其他方面帶來影響. 不過, 增加改變相當簡單, 每個狀態只有一個特定的變化.

四個狀態

#OnState.php

##

<?php
class OnState implements IState
{
  private $light;
  public function __construct(Light $light)
  {
    $this->light = $light;
  }
  public function turnLightOn()
  {
    echo "不合法的操作!<br />";
  }
  public function turnLightOff()
  {
    echo "灯关闭!看不见帅哥chenqionghe了!<br />";
    $this->light->setState($this->light->getOffState());
  }
  public function turnBrighter()
  {
    echo "灯更亮了, 看帅哥chenqionghe看得更真切了!<br />";
    $this->light->setState($this->light->getBrighterState());
  }
  public function turnBrightest()
  {
    echo "不合法的操作!<br />";
  }
}
登入後複製

OffState.php

<?php
class OffState implements IState
{
  private $light;
  public function __construct(Light $light)
  {
    $this->light = $light;
  }
  public function turnLightOn()
  {
    echo "灯打开!可以看见帅哥chenqionghe了!<br />";
    $this->light->setState($this->light->getOnState());
  }
  public function turnLightOff()
  {
    echo "不合法的操作!<br />";
  }
  public function turnBrighter()
  {
    echo "不合法的操作!<br />";
  }
  public function turnBrightest()
  {
    echo "不合法的操作!<br />";
  }
}
登入後複製

Brighter.php

<?php
class BrighterState implements IState
{
  private $light;
  public function __construct(Light $light)
  {
    $this->light = $light;
  }
  public function turnLightOn()
  {
    echo "不合法的操作!<br />";
  }
  public function turnLightOff()
  {
    echo "不合法的操作!<br />";
  }
  public function turnBrighter()
  {
    echo "不合法的操作!<br />";
  }
  public function turnBrightest()
  {
    echo "灯最亮了, 看帅哥chenqionghe已经帅到无敌!<br />";
    $this->light->setState($this->light->getBrightestState());
  }
}
登入後複製

Brightest.php

#

<?php
class BrightestState implements IState
{
  private $light;
  public function __construct(Light $light)
  {
    $this->light = $light;
  }
  public function turnLightOn()
  {
    echo "灯已经打开了->不做操作<br />";
  }
  public function turnLightOff()
  {
    echo "灯关闭!看不见帅哥chenqionghe了!<br />";
    $this->light->setState($this->light->getOffState());
  }
  public function turnBrighter()
  {
    echo "不合法的操作!<br />";
  }
  public function turnBrightest()
  {
    echo "不合法的操作!<br />";
  }
}
登入後複製

更新Light類別

Light.php

<?php
class Light
{
  private $offState; //关闭状态
  private $onState;  //开启状态
  private $brighterState; //更亮状态
  private $brightestState;//最亮状态
  private $currentState; //当前状态
  public function __construct()
  {
    $this->offState = new OffState($this);
    $this->onState = new OnState($this);
    $this->brighterState = new BrighterState($this);
    $this->brightestState = new BrightestState($this);
    //开始状态为关闭状态Off
    $this->currentState = $this->offState;
  }
  //调用状态方法触发器
  public function turnLightOn()
  {
    $this->currentState->turnLightOn();
  }
  public function turnLightOff()
  {
    $this->currentState->turnLightOff();
  }
  public function turnLightBrighter()
  {
    $this->currentState->turnBrighter();
  }
  public function turnLigthBrightest()
  {
    $this->currentState->turnBrightest();
  }
  //设置当前状态
  public function setState(IState $state)
  {
    $this->currentState = $state;
  }
  //获取状态
  public function getOnState()
  {
    return $this->onState;
  }
  public function getOffState()
  {
    return $this->offState;
  }
  public function getBrighterState()
  {
    return $this->brighterState;
  }
  public function getBrightestState()
  {
    return $this->brightestState;
  }
}
登入後複製

更新客户

<?php
function __autoload($class_name)
{
  include_once $class_name.&#39;.php&#39;;
}
class Client
{
  private $light;
  public function __construct()
  {
    $this->light = new Light();
    $this->light->turnLightOn();
    $this->light->turnLightBrighter();
    $this->light->turnLigthBrightest();
    $this->light->turnLightOff();
    $this->light->turnLigthBrightest();
  }
}
$worker = new Client();
登入後複製

运行结果如下

灯打开!可以看见帅哥chenqionghe了!
灯更亮了, 看帅哥chenqionghe看得更真切了!
灯最亮了, 看帅哥chenqionghe已经帅到无敌!
灯关闭!看不见帅哥chenqionghe了!
不合法的操作!

九宫格移动示例

九宫格的移动分为4个移动:

上(Up)
下(Down)
左(Left)
右(Right)

对于这些移动,规则是要求单元格之间不能沿对角线方向移动. 另外, 从一个单元格移动到下一个单元格时, 一次只能移动一个单元格

要使用状态设计模式来建立一个九宫格移动示例,

建立接口

IMatrix.php

<?php
interface IMatrix
{
  public function goUp();
  public function goDown();
  public function goLeft();
  public function goRight();
}
登入後複製

虽然这个状态设计模式有9个状态, 分别对应九个单元格, 但一个状态最多只需要4个变迁

上下文

对于状态中的4个变迁或移动方法, 上下文必须提供相应方法来调用这些变迁方法, 另外还要完成各个状态的实例化.

Context.php

<?php
class Context
{
  private $cell1;
  private $cell2;
  private $cell3;
  private $cell4;
  private $cell5;
  private $cell6;
  private $cell7;
  private $cell8;
  private $cell9;
  private $currentState;
  public function __construct()
  {
    $this->cell1 = new Cell1State($this);
    $this->cell2 = new Cell2State($this);
    $this->cell3 = new Cell3State($this);
    $this->cell4 = new Cell4State($this);
    $this->cell5 = new Cell5State($this);
    $this->cell6 = new Cell6State($this);
    $this->cell7 = new Cell7State($this);
    $this->cell8 = new Cell8State($this);
    $this->cell9 = new Cell9State($this);
    $this->currentState = $this->cell5;
  }
  //调用方法
  public function doUp()
  {
    $this->currentState->goUp();
  }
  public function doDown()
  {
    $this->currentState->goDown();
  }
  public function doLeft()
  {
    $this->currentState->goLeft();
  }
  public function doRight()
  {
    $this->currentState->goRight();
  }
  //设置当前状态
  public function setState(IMatrix $state)
  {
    $this->currentState = $state;
  }
  //获取状态
  public function getCell1State()
  {
    return $this->cell1;
  }
  public function getCell2State()
  {
    return $this->cell2;
  }
  public function getCell3State()
  {
    return $this->cell3;
  }
  public function getCell4State()
  {
    return $this->cell4;
  }
  public function getCell5State()
  {
    return $this->cell5;
  }
  public function getCell6State()
  {
    return $this->cell6;
  }
  public function getCell7State()
  {
    return $this->cell7;
  }
  public function getCell8State()
  {
    return $this->cell8;
  }
  public function getCell9State()
  {
    return $this->cell9;
  }
}
登入後複製

状态

9个状态表示九宫格中的不同单元格, 为了唯一显示单元格,会分别输出相应到达的单元格数字, 这样能够更清楚地看出穿过矩阵的路线.

Cell1State

<?php
class Cell1State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goRight()
  {
    echo &#39;走到<strong>2</strong><br />&#39;;
    $this->context->setState($this->context->getCell2State());
  }
  public function goUp()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goDown()
  {
    echo &#39;走到<strong>4</strong><br />&#39;;
    $this->context->setState($this->context->getCell4State());
  }
}
登入後複製

Cell2State

<?php
class Cell2State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;走到<strong>1</strong><br />&#39;;
    $this->context->setState($this->context->getCell1State());
  }
  public function goRight()
  {
    echo &#39;走到<strong>3</strong><br />&#39;;
    $this->context->setState($this->context->getCell3State());
  }
  public function goUp()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goDown()
  {
    echo &#39;走到<strong>5</strong><br />&#39;;
    $this->context->setState($this->context->getCell5State());
  }
}
登入後複製

Cell3State

<?php
class Cell3State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;走到<strong>2</strong><br />&#39;;
    $this->context->setState($this->context->getCell2State());
  }
  public function goRight()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goUp()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goDown()
  {
    echo &#39;走到<strong>6</strong><br />&#39;;
    $this->context->setState($this->context->getCell6State());
  }
}
登入後複製

Cell4State

<?php
class Cell4State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goRight()
  {
    echo &#39;走到<strong>5</strong><br />&#39;;
    $this->context->setState($this->context->getCell5State());
  }
  public function goUp()
  {
    echo &#39;走到<strong>1</strong><br />&#39;;
    $this->context->setState($this->context->getCell1State());
  }
  public function goDown()
  {
    echo &#39;走到<strong>7</strong><br />&#39;;
    $this->context->setState($this->context->getCell7State());
  }
}
登入後複製

Cell5State

<?php
class Cell5State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;走到<strong>4</strong><br />&#39;;
    $this->context->setState($this->context->getCell4State());
  }
  public function goRight()
  {
    echo &#39;走到<strong>6</strong><br />&#39;;
    $this->context->setState($this->context->getCell6State());
  }
  public function goUp()
  {
    echo &#39;走到<strong>2</strong><br />&#39;;
    $this->context->setState($this->context->getCell2State());
  }
  public function goDown()
  {
    echo &#39;走到<strong>8</strong><br />&#39;;
    $this->context->setState($this->context->getCell8State());
  }
}
登入後複製

Cell6State

<?php
class Cell6State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;走到<strong>5</strong><br />&#39;;
    $this->context->setState($this->context->getCell5State());
  }
  public function goRight()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goUp()
  {
    echo &#39;走到<strong>3</strong><br />&#39;;
    $this->context->setState($this->context->getCell3State());
  }
  public function goDown()
  {
    echo &#39;走到<strong>9</strong><br />&#39;;
    $this->context->setState($this->context->getCell9State());
  }
}
登入後複製

Cell7State

<?php
class Cell7State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goRight()
  {
    echo &#39;走到<strong>8</strong><br />&#39;;
    $this->context->setState($this->context->getCell8State());
  }
  public function goUp()
  {
    echo &#39;走到<strong>4</strong><br />&#39;;
    $this->context->setState($this->context->getCell4State());
  }
  public function goDown()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
}
登入後複製

Cell8State

<?php
class Cell8State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;走到<strong>7</strong><br />&#39;;
    $this->context->setState($this->context->getCell7State());
  }
  public function goRight()
  {
    echo &#39;走到<strong>9</strong><br />&#39;;
    $this->context->setState($this->context->getCell9State());
  }
  public function goUp()
  {
    echo &#39;走到<strong>5</strong><br />&#39;;
    $this->context->setState($this->context->getCell5State());
  }
  public function goDown()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
}
登入後複製

Cell9State

<?php
class Cell9State implements IMatrix
{
  private $context;
  public function __construct(Context $contextNow)
  {
    $this->context = $contextNow;
  }
  public function goLeft()
  {
    echo &#39;走到<strong>8</strong><br />&#39;;
    $this->context->setState($this->context->getCell8State());
  }
  public function goRight()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
  public function goUp()
  {
    echo &#39;走到<strong>6</strong><br />&#39;;
    $this->context->setState($this->context->getCell6State());
  }
  public function goDown()
  {
    echo &#39;不合法的移动!<br />&#39;;
  }
}
登入後複製

要想有效地使用状态设计模式, 真正的难点在于要想象现实或模拟世界是怎么样

客户Client

下面从单元格5开始进行一个上,右,下, 下,左,上的移动

Client.php

<?php
function __autoload($class_name)
{
  include_once $class_name.&#39;.php&#39;;
}
class Client
{
  private $context;
  public function __construct()
  {
    $this->context = new Context();
    $this->context->doUp();
    $this->context->doRight();
    $this->context->doDown();
    $this->context->doDown();
    $this->context->doLeft();
    $this->context->doUp();
  }
}
$worker = new Client();
登入後複製

运行结果如下

走到2
走到3
走到6
走到9
走到8
走到5

状态模式与PHP

很多人把状态设计模式看做是实现模拟器和游戏的主要方法.总的说来, 这确实是状态模式的目标,不过险些之外, 状态模型(状态引擎)和状态设计模式在PHP中也有很多应用.用PHP完成更大的项目时, 包括Facebook和WordPress, 会有更多的新增特性和当前状态需求.对于这种不断有改变和增长的情况, 就可以采用可扩展的状态模式来管理.

PHP开发人员如何创建包含多个状态的程序, 将决定状态模式的使用范围. 所以不仅状态机在游戏和模拟世界中有很多应用, 实际上状态模型还有更多适用的领域.只要PHP程序的用户会用到一组有限的状态, 开发人员就可以使用状态设计模式.

相关推荐:

php设计模式一之命名空间、自动加载类、PSR-0编码规范

16个PHP设计模式介绍


以上是PHP設計模式之狀態模式定義與用法的詳細內容。更多資訊請關注PHP中文網其他相關文章!

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25:如何解鎖Myrise中的所有內容
4 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

適用於 Ubuntu 和 Debian 的 PHP 8.4 安裝和升級指南 適用於 Ubuntu 和 Debian 的 PHP 8.4 安裝和升級指南 Dec 24, 2024 pm 04:42 PM

PHP 8.4 帶來了多項新功能、安全性改進和效能改進,同時棄用和刪除了大量功能。 本指南介紹如何在 Ubuntu、Debian 或其衍生版本上安裝 PHP 8.4 或升級到 PHP 8.4

CakePHP 日期和時間 CakePHP 日期和時間 Sep 10, 2024 pm 05:27 PM

為了在 cakephp4 中處理日期和時間,我們將使用可用的 FrozenTime 類別。

討論 CakePHP 討論 CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP 是 PHP 的開源框架。它旨在使應用程式的開發、部署和維護變得更加容易。 CakePHP 基於類似 MVC 的架構,功能強大且易於掌握。模型、視圖和控制器 gu

CakePHP 檔案上傳 CakePHP 檔案上傳 Sep 10, 2024 pm 05:27 PM

為了進行文件上傳,我們將使用表單助理。這是文件上傳的範例。

CakePHP 建立驗證器 CakePHP 建立驗證器 Sep 10, 2024 pm 05:26 PM

可以透過在控制器中新增以下兩行來建立驗證器。

如何設定 Visual Studio Code (VS Code) 進行 PHP 開發 如何設定 Visual Studio Code (VS Code) 進行 PHP 開發 Dec 20, 2024 am 11:31 AM

Visual Studio Code,也稱為 VS Code,是一個免費的原始碼編輯器 - 或整合開發環境 (IDE) - 可用於所有主要作業系統。 VS Code 擁有大量針對多種程式語言的擴展,可以輕鬆編寫

CakePHP 快速指南 CakePHP 快速指南 Sep 10, 2024 pm 05:27 PM

CakePHP 是一個開源MVC 框架。它使應用程式的開發、部署和維護變得更加容易。 CakePHP 有許多函式庫可以減少大多數常見任務的過載。

您如何在PHP中解析和處理HTML/XML? 您如何在PHP中解析和處理HTML/XML? Feb 07, 2025 am 11:57 AM

本教程演示瞭如何使用PHP有效地處理XML文檔。 XML(可擴展的標記語言)是一種用於人類可讀性和機器解析的多功能文本標記語言。它通常用於數據存儲

See all articles