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.
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.
Your code looks like c# and you talk about vs2010, but question tags are about php?
In case the labels are wrong, Resharper is what you need. It does it and a lot more.
http://www.jetbrains.com/resharper/
It's not free, but they have a time limited version to try.