Completed
Push — master ( 26e625...88c602 )
by Timo
02:58
created

Realm::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
/*
4
 * This file is part of the Tidal/WampWatch package.
5
 *   (c) 2016 Timo Michna <timomichna/yahoo.de>
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
12
namespace Tidal\WampWatch\Model;
13
14
use Tidal\WampWatch\Model\Property\Scalar\HasNameTrait;
15
use Tidal\WampWatch\Model\Property\Collection\HasTopicsTrait;
16
use Tidal\WampWatch\Model\Property\Collection\HasProceduresTrait;
17
use Tidal\WampWatch\Model\Property\Object\HasRouterTrait;
18
use Tidal\WampWatch\Model\Behavior\Property\HasCollectionsTrait;
19
use Tidal\WampWatch\Model\Property\ObjectCollection;
20
21
class Realm implements Contract\RealmInterface
22
{
23
    use HasCollectionsTrait;
24
    use HasNameTrait;
25
    use HasTopicsTrait;
26
    use HasProceduresTrait;
27
    use HasRouterTrait;
28
29
    public function __construct($name, Contract\RouterInterface $router)
30
    {
31
        $this->setName($name);
32
        $this->setRouter($router);
33
        $this->setProcedures(new ObjectCollection());
34
        $this->setTopics(new ObjectCollection());
35
    }
36
}
37