Support for PHPDoc @property

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

Support for PHPDoc @property

Postby formula349 » September 27th, 2012, 6:52 pm

I tried adding this property (which worked great in another product I was using) to add a property to a class which is accessed through the __get magic method.

I noticed that the intellisense within the PHPDoc section does not list @property, and the property does not show up in the object's intellisense either. Any plans to add support for this? Without this, it makes it less desirable to work with __get magic methods.

Here is an example (incomplete).

Code: Select all
/**
 * Summary of Customer
 * @property Order $Orders A list of all orders for this customer
 *
 */
class Customer {
    protected $NavOrders;
    public __get($name) {
        if($name == "Orders")
            return $this->NavOrders;
    }
}
$customer = new Customer();

// This shows up in intellisense, but is not accessible (protected)
$customer->NavOrders
// This does not show up in intellisense, and is accessible
$customer->Orders
formula349
 
Posts: 6
Joined: August 26th, 2012, 8:50 pm

Re: Support for PHPDoc @property

Postby Jakub Misek » September 27th, 2012, 8:45 pm

Hi,

Thanks for noticing.

Support for @property will be added in one of the next releases.

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

Re: Support for PHPDoc @property

Postby Jakub Misek » September 28th, 2012, 3:26 pm

We have added support for @property and @method PHPDoc tags (as described below) into the IntelliSense. Both tags are in IntelliSense when writing PHPDoc content, and specified members are included in instance members list ($x->...).

http://manual.phpdoc.org/HTMLSmartyConv ... y.pkg.html
http://manual.phpdoc.org/HTMLSmartyConv ... d.pkg.html
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Support for PHPDoc @property

Postby BladeMF » October 10th, 2012, 7:14 am

Is this support included in the currently released version?
Welcome to the zone where normal things don't happen very often.
BladeMF
 
Posts: 346
Joined: October 10th, 2012, 7:14 am

Re: Support for PHPDoc @property

Postby Miloslav Beno » October 10th, 2012, 12:21 pm

Hi BladMF,

It's not present in public release yet, but we will release the update any day from now. I'll write to this thread once it's out.

Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 42 guests

cron

User Control Panel

Login

Who is online

In total there are 42 users online :: 0 registered, 0 hidden and 42 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 42 guests