米诺的后花园

php 用trait 解决单继承问题实例

用实例来了解php的trait,Trait的声明使用trait关键词,trait不能实例化,通过在其他类中使用use 关键字,声明要组合的Trait名称。爽快。