Auto-implement Interface/Abstract classes

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Auto-implement Interface/Abstract classes

Postby ehorodyski » May 6th, 2014, 10:46 pm

*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?
ehorodyski
 
Posts: 1
Joined: May 6th, 2014, 10:38 pm

Re: Auto-implement Interface/Abstract classes

Postby Jakub Misek » May 9th, 2014, 11:23 am

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,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 59 guests

cron

User Control Panel

Login

Who is online

In total there are 59 users online :: 0 registered, 0 hidden and 59 guests (based on users active over the past 5 minutes)
Most users ever online was 511 on April 27th, 2024, 10:11 pm

Users browsing this forum: No registered users and 59 guests