File: D:/HostingSpaces/SBogers10/topswtwmobile.komma.pro/app/KommaApp/Shop/Products/ProductService.php
<?php
namespace KommaApp\Shop\Products;
class ProductService
{
/**
* @var ProductRepository
*/
private $repository;
public function __construct(ProductRepository $repository)
{
$this->repository = $repository;
}
public function getById($productId)
{
return $this->repository->getByProductId($productId);
}
public function countByCategoryId($categoryId){
return $this->repository->countProductsByCategoryId($categoryId);
}
public function getByCategoryId($categoryId, $skip = null, $take = null){
return $this->repository->getProductsByCategoryId($categoryId, $skip, $take);
}
public function getByRoutableId($routableId)
{
return $this->repository->getProductsByRoutableId($routableId);
}
public function getProductRouteByInternalArticleNumber($internal_artilce_number, $lang_iso){
return $this->repository->getProductRouteByInternalArticleNumber($internal_artilce_number, $lang_iso);
}
}