php设计模式-抽象工厂模式

createOne();
        $man_one->say();
        $man_two = $factory->createTwo();
        $man_two->say();

        $factory = new FactoryWoman();
        $woman_one = $factory->createOne();
        $woman_one->say();
        $woman_two = $factory->createTwo();
        $woman_two->say();
    }
}

$result = new Client();
$result->test();

你可能感兴趣的:(php设计模式-抽象工厂模式)