Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
让我们检查一个Factory类。它可以返回任何类,或者至少一个修复类。代码竞赛无法知道它的方法/属性,如何“告诉”IDE 的它的类?
Factory
您可以使用 PHPDoc,大多数 IDE 都支持它。
/** * Factory::make() * * @param string $classname * * @return Object - The object being made. */