Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » PhpDoc @property typed arrays not recognized ?
PhpDoc @property typed arrays not recognized ? [message #1011759] Wed, 20 February 2013 07:58
Daniel Jann is currently offline Daniel JannFriend
Messages: 1
Registered: February 2013
Junior Member
I saw in the PDT 3.1.1 release notes, section "Properly resolve type of elements in arrays based on "<typeName>[]" in PHPDoc blocks" that a function returning an array of custom classe's object may be specified using PhpDoc:

class Employee {
  public function getName() {}
  public function getSalary() {}

 * @return Employee[]
function listOfEmployees() {

$a = listOfEmployees();

when typing last line, code completion will show getName() and getSalary() as expected. Great!!

But it doesn't seem to work with magic properties:

 * Employee
 * @property string name
 * @property string salary
 * @property Employee[] coWorkers
class Employee {
  function __get($name) {

 * @return Employee
function getEmployee(/*...*/) {

$a = getEmployee();

Now code completion should show name, salary and coWorkers, but it doesn't.

Unless I missed something, this doesn't seem to be implemented. Is there any plan to implement it ?
Previous Topic:Performance Issue - Very slow editor response
Next Topic:How to add PHP servers and debug configurations from outside?
Goto Forum:

Current Time: Mon Jan 30 01:01:54 GMT 2023

Powered by FUDForum. Page generated in 0.15551 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top