Completed
Push — master ( 7e7dbd...2fc7ef )
by Vladimir
22s
created

getCollectableItem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @copyright 2018 Vladimir Jimenez
5
 * @license   https://github.com/stakx-io/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx\Event;
9
10
use allejo\stakx\Document\CollectableItem;
11
use Symfony\Component\EventDispatcher\Event;
12
13
/**
14
 * This event is triggered after a Dynamic PageView is compiled and before it is written to a file. The compiled output
15
 * is accessible and can be modified before it is written out to a file.
16
 *
17
 * @since 0.2.0
18
 */
19
class CompilerPostRenderDynamicPageView extends Event
20
{
21
    use CompilerPostRenderTrait;
22
23
    const NAME = 'compiler.postrender.dynamic_pageview';
24
25
    private $collectableItem;
26
27
    /**
28
     * @param string $compiledOutput
29
     */
30
    public function __construct(CollectableItem $collectableItem, $compiledOutput)
31
    {
32
        $this->collectableItem = $collectableItem;
33
        $this->compiledOutput = $compiledOutput;
34
    }
35
36
    public function getCollectableItem()
37
    {
38
        return clone $this->collectableItem;
39
    }
40
}
41