This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155133

Summary: Code completition while iterating object with foreach
Product: php Reporter: leszczu <leszczu>
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: RESOLVED WORKSFORME    
Severity: blocker CC: doldev
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description leszczu 2008-12-10 13:40:30 UTC
I would like to see code completition while iterating objects implementing Iterator interface in foreach, something like
this:

class Foo implements Iterator {
//code here
}
$bar = new Foo();
foreach ($bar as $barElement) { //code completition should work while typing $bar
 echo $barElement;
}

there's info about this feature in php manual (http://pl.php.net/manual/en/language.oop5.iterations.php Example #2)
Comment 1 Tomasz Slota 2010-02-10 08:45:38 UTC
reassigning to default owner
Comment 2 Filip Zamboj 2010-09-15 12:27:52 UTC
batch reassigning
Comment 3 doldev 2010-11-30 15:48:40 UTC
More information about this problem can be found at:
http://stackoverflow.com/questions/4111174/netbeans-intellisense-php-iterator-interface
Comment 4 Ondrej Brejla 2012-04-24 09:56:24 UTC
Works for me in 7.2.