public function toItems(array $objects): array
    {
        $items = [];
        foreach ($objects as $object) {
            $item = $this->toItem($object);
            if ($item instanceof Item) {
                $items[] = $item;
            }
        }

        return $items;
    }
public function toItems(array $objects): array
    {
        $items = [];
        foreach ($objects as $object) {
            $item = $this->toItem($object);
            if ($item instanceof Item) {
                $items[] = $item;
            }
        }

        return $items;
    }
public function toItems ( array $ objects ) : array { $ items = [ ] ; foreach ( $ objects as $ object ) { $ item = $ this -> toItem ( $ object ) ; if ( $ item instanceof Item ) { $ items [ ] = $ item ; } } return $ items ; }
Transform a set of objects into a set of items.

@param array $objects

@return Item[]
Transform a set of objects into a set of items .