Completed
Push — master ( 808f8c...952fde )
by Vladimir
11s
created

CollectionDefinitionAdded::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
/**
4
 * @copyright 2018 Vladimir Jimenez
5
 * @license   https://github.com/allejo/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx\Event;
9
10
use Symfony\Component\EventDispatcher\Event;
11
12
/**
13
 * A notification-only event fired whenever a new, valid Collection definition is registered.
14
 *
15
 * @since 0.2.0
16
 */
17
class CollectionDefinitionAdded extends Event
18
{
19
    const NAME = 'collection.definition.added';
20
21
    private $collectionName;
22
    private $folderName;
23
24 36
    public function __construct($collectionName, $folderName)
25
    {
26 36
        $this->collectionName = $collectionName;
27 36
        $this->folderName = $folderName;
28 36
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getCollectionName()
34
    {
35
        return $this->collectionName;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getFolderName()
42
    {
43
        return $this->folderName;
44
    }
45
}
46