autoload differnece between class and interface php

后端 未结 3 1001
盖世英雄少女心
盖世英雄少女心 2021-01-14 19:15

I\'m searching for following issue i have. The class file names of our project are named logon.class.php But the interface file for that class is named logon.interface.php

3条回答
  •  醉梦人生
    2021-01-14 19:32

    You should have some naming conventions for your classes and interfaces e.g. your class name is logon and interface name logon_interface, then you can easily differentiate between the two. For example, explode $name by underscore and check if last element is interface.

提交回复
热议问题