ServiceActivator::__construct()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 4 Features 0
Metric Value
c 5
b 4
f 0
dl 0
loc 10
rs 9.4285
cc 3
eloc 6
nc 4
nop 3
1
<?php
2
3
namespace PEIP\Service;
4
5
/*
6
 * This file is part of the PEIP package.
7
 * (c) 2009-2016 Timo Michna <timomichna/yahoo.de>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
/**
14
 * ServiceActivator.
15
 *
16
 * @author Timo Michna <timomichna/yahoo.de>
17
 * @extends \PEIP\ABS\Service\ServiceActivator
18
 * @implements \PEIP\INF\Message\MessageBuilder, \PEIP\INF\Handler\Handler, \PEIP\INF\Channel\Channel, \PEIP\INF\Channel\SubscribableChannel, \PEIP\INF\Event\Connectable
19
 */
20
class ServiceActivator extends \PEIP\ABS\Service\ServiceActivator
21
{
22
    /**
23
     * @param $serviceCallable
24
     * @param $inputChannel
25
     * @param $outputChannel
26
     *
27
     * @return
28
     */
29
    public function __construct($serviceCallable, \PEIP\INF\Channel\Channel $inputChannel = null, \PEIP\INF\Channel\Channel $outputChannel = null)
30
    {
31
        $this->serviceCallable = $serviceCallable;
32
        if (is_object($inputChannel)) {
33
            $this->setInputChannel($inputChannel);
34
        }
35
        if (is_object($outputChannel)) {
36
            $this->setOutputChannel($outputChannel);
37
        }
38
    }
39
}
40