Home>Article>Backend Development> A simple example of interface adaptation in PHP adapter mode
PHPAdapter patternInterfaceSimple example of adaptation
action2', '
'; } } class Adapter2 extends AbstractAdapter { public function action3() { echo 'call action3', '
'; } } // test code $a1 = new Adapter(); $a1->action2(); $a2 = new Adapter2(); $a2->action3();
The above is the detailed content of A simple example of interface adaptation in PHP adapter mode. For more information, please follow other related articles on the PHP Chinese website!