I have a class which is a simple extension of the ArrayObject class:
/**
* what to put here? :)
*/
class Collection extends \ArrayObject
{
/**
* @param Item
*/
public function add(Item $item)
{
$this->append($item);
}
}
Is it possible to get my IDE to use code completion for the elements of my ArrayObject-extended class?
foreach ($collection as $item)
{
$item->getPrice(); //my IDE doesn't not know the object here
}