Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
4 / 4
CRAP
100.00% covered (success)
100.00%
1 / 1
TaskLogArchivedEvent
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
4 / 4
4
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getTaskLogEntity
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isForced
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; under version 2
7 * of the License (non-upgradable).
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 *
18 * Copyright (c) 2017 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
19 *
20 */
21
22namespace oat\tao\model\taskQueue\Event;
23
24use oat\oatbox\event\Event;
25use oat\tao\model\taskQueue\TaskLog\Entity\EntityInterface;
26
27class TaskLogArchivedEvent implements Event
28{
29    /**
30     * @var EntityInterface
31     */
32    private $taskLogEntity;
33
34    /**
35     * @var bool
36     */
37    private $isForced;
38
39    /**
40     * TaskLogArchivedEvent constructor.
41     *
42     * @param EntityInterface $taskLogEntity
43     * @param bool                   $isForced
44     */
45    public function __construct(EntityInterface $taskLogEntity, $isForced = false)
46    {
47        $this->taskLogEntity = $taskLogEntity;
48        $this->isForced = $isForced;
49    }
50
51    /**
52     * @return EntityInterface
53     */
54    public function getTaskLogEntity()
55    {
56        return $this->taskLogEntity;
57    }
58
59    /**
60     * @return bool
61     */
62    public function isForced()
63    {
64        return $this->isForced;
65    }
66
67    /**
68     * @return string
69     */
70    public function getName()
71    {
72        return __CLASS__;
73    }
74}