2011-04-11 100 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

相關問題