我在 ZF3 Controller 类的 phpStorm 中收到错误,并显示以下消息:
Method 'flashMessenger' not found in ...Controller
与此同时,它的作用就像一个魅力。但我希望无论如何都能删除此 IDE 未找到错误。
该应用程序已更新为 ZF3
,并且我安装了 Zendframework GitHub 上找到的 flash Messenger 插件
感谢您的帮助。
最佳答案
发生错误的原因是 Controller 插件不是类上的方法,而是 Controller 的 __call
方法中返回的类本身。
这意味着 PhpStorm“未定义方法”PHP 检查无法看到类中的方法。可以在编辑器 -> 检查 -> PHP 下的设置中禁用它,但这显然也会阻止检查识别实际错误。
关于php - 在 Controller 中找不到 fllashMessenger() 说 phpStorm 但正在工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41050715/