public function getProductDetails($productInfo = array()) { switch ($this->product_type) { case 'post_listings': $this->details = new SJB_PostListingsProduct($productInfo); $this->pages = $this->details->getPages(); break; case 'access_listings': $this->details = new SJB_AccessListingsProduct($productInfo); $this->pages = $this->details->getPages(); break; case 'mixed_product': $this->details = new SJB_MixedProduct($productInfo); $this->pages = $this->details->getPages(); break; case 'featured_user': $this->details = new SJB_FeaturedUserProduct($productInfo); $this->pages = $this->details->getPages(); break; case 'banners': $this->details = new SJB_BannersProduct($productInfo); $this->pages = $this->details->getPages(); break; case 'custom_product': $this->details = new SJB_CustomProduct($productInfo); $this->pages = $this->details->getPages(); break; } }