Page 1 of 1

Support for PHPDoc @property

PostPosted: September 27th, 2012, 6:52 pm
by formula349
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

Re: Support for PHPDoc @property

PostPosted: September 27th, 2012, 8:45 pm
by Jakub Misek
Hi,

Thanks for noticing.

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

Thanks

Re: Support for PHPDoc @property

PostPosted: September 28th, 2012, 3:26 pm
by Jakub Misek
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

Re: Support for PHPDoc @property

PostPosted: October 10th, 2012, 7:14 am
by BladeMF
Is this support included in the currently released version?

Re: Support for PHPDoc @property

PostPosted: October 10th, 2012, 12:21 pm
by Miloslav Beno
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,