如何自动生成已实现接口的方法 [英] How to auto-generate methods of the implemented interface
本文介绍了如何自动生成已实现接口的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
PhpStorm中是否有一种方法可以自动生成给定类正在实现的接口所需的空方法?
Is there a way in PhpStorm to automatically generate the empty methods that are required by the interface the given class is implementing?
假设我们有一个包含3种方法的接口-在定义实现该接口的新类时-一种为所有必需方法自动生成容器的选项.
Say we have an Interface with 3 methods - when defining the new class that implements this interface - some option to auto-generate containers for all required methods.
推荐答案
根据我的评论:您可以尝试 ALT + ENTER .通常,这会显示一个小的对话框",以自动生成phpdoc,函数等.
From my comment: You could try ALT + ENTER. This normaly shows up a small "dialog" to autogenerate phpdoc, functions, etc.
这篇关于如何自动生成已实现接口的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文