dongsou3041 2012-09-26 15:11
浏览 12
已采纳

用于从类中提取接口的工具[重复]

Possible Duplicate:
Generate PHP Interfaces

As I want to program against a interface I am looking for a tool that can extract a Interface out of a class.

Suppose I a have a class like this:

<?php
    class Foo
    {
      public function Bar()
      {
      }
    }
?>

then I want the result to be this:

interface IFoo
{
  public function Bar();
}

Obvious, for a simple class it is very easy by hand. But I want to extract a interface from the fpdf class, and that is a lot of work.

Any tools for this?

note: In VS2010 this is very easy, just a few clicks.

  • 写回答

2条回答 默认 最新

  • doujie3888 2012-09-27 11:27
    关注

    There is a PHP based library containing a commandline tool as well that is able to extract interfaces out of a class definition:

    This is a more convenient variant of what has been outlined in the related question Extracting just the interface from a PHP application, for code completion.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害