2011-04-11 103 views

回答

8

您可以使用\指向全局命名空间:

namespace MyClass\Util; 

class Sample { 

    public function each(\Object $f) { 

    } 
} 


作为参考,你可以阅读Global space(引用)

Prefixing a name with \ will specify that the name is required from the global space even in the context of the namespace.

+0

它的作品!我一定错过了手册中的那一部分。 – james 2011-04-11 18:02:43

相关问题