<?php

namespace Shop\Services;

use Shop\Models\Category\CategoryQuery;

/**
 * Сервисы для Разделов
 *
 * @author Dmitriy
 */
class Category {

    /**
     *
     * @var \Shop\Repositories\Category 
     */
    protected $categoryRepo;

    public function __construct(\Shop\Repositories\Category $categoryRepo) {
        $this->categoryRepo = $categoryRepo;
    }

    /**
     * @deprecated 
     * @see \Shop\Repositories\Category::findByAlias($alias)
     * @param type $alias
     * @return type
     */
    public function findByAlias($alias) {
        return $this->categoryRepo->findOneByAlias($alias);
    }

}
