1 <?php
2
3 /* --------------------------------------------------------------
4 CategoryObjectService.php 2015-11-23
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Class CategoryObjectService
15 *
16 * Use this class for creating new categories objects with its default values.
17 *
18 * @category System
19 * @package Category
20 */
21 class CategoryObjectService implements CategoryObjectServiceInterface
22 {
23 /**
24 * CategoryFactory interface.
25 * @var CategoryFactoryInterface
26 */
27 protected $categoryFactory;
28
29 /**
30 * CategoryObjectService constructor.
31 *
32 * @param CategoryFactoryInterface $categoryFactory The category factory.
33 */
34 public function __construct(CategoryFactoryInterface $categoryFactory)
35 {
36 $this->categoryFactory = $categoryFactory;
37 }
38
39
40 /**
41 * Creates a new category object with its default values.
42 *
43 * @return CategoryInterface
44 */
45 public function createCategoryObject()
46 {
47 return $this->categoryFactory->createCategory();
48 }
49 }