<?php interface FlyBehavior{ public function fly(); } class FlyWithWings implements FlyBehavior{ public function fly(){ echo "Fly With Wings ".PHP_EOL; } } class FlyWithNo implements FlyBehavior{ public function fly(){ echo "Fly With No Wings ".PHP_EOL; } }
策略模式实例与UML
最新推荐文章于 2024-05-31 13:39:03 发布