Completed
Push — master ( e3fd8d...67ee93 )
by Ivannis Suárez
02:53
created

PostPersistEvent::eventStream()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the Cubiche package.
4
 *
5
 * Copyright (c) Cubiche
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Cubiche\Domain\EventSourcing\Event;
12
13
use Cubiche\Domain\EventPublisher\DomainEvent;
14
use Cubiche\Domain\EventSourcing\EventSourcedAggregateRootInterface;
15
use Cubiche\Domain\EventSourcing\EventStore\EventStream;
16
17
/**
18
 * PostPersistEvent class.
19
 *
20
 * @author Ivannis Suárez Jerez <[email protected]>
21
 */
22
class PostPersistEvent extends DomainEvent
23
{
24
    /**
25
     * @var EventSourcedAggregateRootInterface
26
     */
27
    protected $aggregate;
28
29
    /**
30
     * @var EventStream
31
     */
32
    protected $eventStream;
33
34
    /**
35
     * PrePersistEvent constructor.
36
     *
37
     * @param EventSourcedAggregateRootInterface $aggregate
38
     */
39
    public function __construct(EventSourcedAggregateRootInterface $aggregate, EventStream $eventStream)
40
    {
41
        parent::__construct();
42
43
        $this->aggregate = $aggregate;
44
        $this->eventStream = $eventStream;
45
    }
46
47
    /**
48
     * @return EventSourcedAggregateRootInterface
49
     */
50
    public function aggregate()
51
    {
52
        return $this->aggregate;
53
    }
54
55
    /**
56
     * @return EventStream
57
     */
58
    public function eventStream()
59
    {
60
        return $this->eventStream;
61
    }
62
}
63