Auto-implement Interface/Abstract classes
2 posts
• Page 1 of 1
Auto-implement Interface/Abstract classes
*I tried searching the boards for an answer to this but wasn't able to find something comparable so I apologize if this question has already been answered.*
One of my favorite features in Visual Studio is once you define an interface when you choose to implement it in a class you get the option to have VS write stub functions for you to implement the interface/abstract class.
Is this supported in PHP Tools? I have an interface called IController that I want to implement in ContactController. In order to make sure my contract is correct, I'd like to have PHP Tools stub out the methods for me.
Also, I notice that there is no error when the interface is not implemented correctly and that the build reports no errors. I'm using a PHP project. Is there anyway to either get the desired result of auto-generation of stub methods or at least get an error saying the interface isn't implemented correctly?
One of my favorite features in Visual Studio is once you define an interface when you choose to implement it in a class you get the option to have VS write stub functions for you to implement the interface/abstract class.
Is this supported in PHP Tools? I have an interface called IController that I want to implement in ContactController. In order to make sure my contract is correct, I'd like to have PHP Tools stub out the methods for me.
Also, I notice that there is no error when the interface is not implemented correctly and that the build reports no errors. I'm using a PHP project. Is there anyway to either get the desired result of auto-generation of stub methods or at least get an error saying the interface isn't implemented correctly?
- ehorodyski
- Posts: 1
- Joined: May 6th, 2014, 10:38 pm
Re: Auto-implement Interface/Abstract classes
Hi,
We are planning to add feature called Smart Tags which shows the little arrow under the "IController" with an option to create implementation of interface functions.
For now, PHP Tools extends IntelliSense when writing "function<space>" inside the class, it suggests functions from the interface.
Thanks,
We are planning to add feature called Smart Tags which shows the little arrow under the "IController" with an option to create implementation of interface functions.
For now, PHP Tools extends IntelliSense when writing "function<space>" inside the class, it suggests functions from the interface.
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 59 guests