problem with autocomplete in foreach |
Site Admin
|
check your \Nextop\DataCOREBundle\Document\Flight class -- does it support iterator interface?
|
||||||||||||
_________________ The PHP IDE team |
|
\Nextop\DataCOREBundle\Document\Flight is a single element in an array ($flights).
I don't understand..you said that $flights array must become a class and implement iterable interface? |
||||||||||||
|
Guru master
|
Have a look at http://www.php.net/manual/en/class.iterator.php and it gives you an example
I think the issue is that PhpED has no way of knowing what your $flights iterates to, so cannot set $flight appropriately. Implementing the interface cures that. |
||||||||||||
|
Site Admin
|
If you mean that $flights is an ARRAY of Flight instances, just delare this correctly like below: What you declared made the IDE thinking it's class, not an array, and therefore it must support iterator to be used in foreach |
||||||||||||||
_________________ The PHP IDE team |
|
Tnx Dimitri! very clear now. M. |
||||||||||||||
|
problem with autocomplete in foreach |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by