HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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);

    }
}