简体   繁体   English

PhpStorm:如何在自动完成(Zend2 ViewHelper)中从其他类获取所有方法?

[英]PhpStorm: how to get all methods from other class in autocomplete (Zend2 ViewHelper)?

I have a problem (this is not really a problem) with PhpStorm. 我对PhpStorm有问题(这不是真正的问题)。 I'm writing in pure PHP and HTML in Zend2 Views and I need to get autocomplete ( Ctrl + Space ) methods from all Zend ViewHelpers. 我在Zend2 Views中用纯PHP和HTML编写,我需要从所有Zend ViewHelpers中获取自动完成( Ctrl + Space )方法。

I created CustomPhpRender class that inherits from real Zend PhpRenderer . 我创建了CustomPhpRender类,该类继承自实际的Zend PhpRenderer

I cannot find a solution, how can I virtually add all methods from eg Form ViewHelper in one line (in PHPDoc). 我找不到解决方案,我如何才能虚拟地从Form ViewHelper中添加所有方法(在PHPDoc中)。 Instead of this, of course, I can write all @method class for every method I need to get in autocomplete. 当然,除了这个,我还可以为需要自动完成的每种方法编写所有@method类。

Have you got any solution how can I do it? 您有什么解决方案我该怎么办?

As far as I know, phpStorm will not auto-write the required functions for you. 据我所知,phpStorm不会为您自动编写所需的功能。 It will give you warnings are far as what is required. 它将警告您所需要的范围。 I believe it will auto-complete the function declaration for you when you go to declare a required function. 我相信当您声明所需的功能时,它将为您自动完成功能声明。 It will offer a suggestion and then you hit tab. 它将提供建议,然后您单击选项卡。 I've extended classes multiple times, and this is how it has always done it for me. 我已经多次扩展课程,这就是它一直为我完成的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM