Support for PHPDoc @property
Posted: 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).
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