public function getType($item)
    {
        switch ($this->getProductType($item)) {
            case Bundle::TYPE_CODE:
                return $this->bundle->create()->setItem($item);
            case Grouped::TYPE_CODE:
                return $this->grouped->create()->setItem($item);
            case Configurable::TYPE_CODE:
                return $this->configurable->create()->setItem($item);
            default:
                return $this->generic->create()->setItem($item);
        }
    }
public function getType($item)
    {
        switch ($this->getProductType($item)) {
            case Bundle::TYPE_CODE:
                return $this->bundle->create()->setItem($item);
            case Grouped::TYPE_CODE:
                return $this->grouped->create()->setItem($item);
            case Configurable::TYPE_CODE:
                return $this->configurable->create()->setItem($item);
            default:
                return $this->generic->create()->setItem($item);
        }
    }
public function getType ( $ item ) { switch ( $ this -> getProductType ( $ item ) ) { case Bundle :: TYPE_CODE : return $ this -> bundle -> create ( ) -> setItem ( $ item ) ; case Grouped :: TYPE_CODE : return $ this -> grouped -> create ( ) -> setItem ( $ item ) ; case Configurable :: TYPE_CODE : return $ this -> configurable -> create ( ) -> setItem ( $ item ) ; default : return $ this -> generic -> create ( ) -> setItem ( $ item ) ; } }
Retrieves the correct type of product helper
based on passed item object

@param OrderItem | Product | QuoteItem $item

@return Type\Bundle | Type\Generic | Type\Grouped | Type\Configurable
@throws \Exception
Retrieves the correct type of product helper based on passed item object