但是,如果使用 PHP V5 的话,可以将对象类型检查构建到类或方法声明中。
With PHP V5, however, you can build object type checking right into the class or method declaration.
确定GUI组件类型的一种方法是检查源码。
One way to determine GUI component types is by inspecting the source code.
您可以依赖add方法内部的类型检查,但这并不优雅而且不固定。
You could fall back on type checking inside the add method, but that is not elegant and inflexible.
应用推荐