因为我是一个C# - /.NET-guy,我习惯于显式接口实现 - 就像这样:
public interface IBar
{
bool Bacon();
}
public class Foo : IBar
{
bool IBar.Bacon() {}
}
Run Code Online (Sandbox Code Playgroud)
问题:
这可以在php中完成吗?
编辑:
为了澄清,这是隐含的(虽然我想要的,以及上面的例子,是明确的):
public class Foo : IBar
{
bool Bacon() {}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
769 次 |
| 最近记录: |