PhpStorm:自动生成已实现接口的方法 [英] PhpStorm : auto-generate methods of the implemented interface

查看:2373
本文介绍了PhpStorm:自动生成已实现接口的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PhpStorm中是否可以自动生成给定类正在实现的接口所需的空方法?

Is ther 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.

这篇关于PhpStorm:自动生成已实现接口的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆