Completed
Push — master ( bd8241...d66abd )
by Akihito
03:20
created

Config::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
rs 9.4285
cc 1
eloc 9
nc 1
nop 1
1
<?php
2
namespace Ackintosh\Snidel;
3
4
class Config
5
{
6
    /** @var array */
7
    private $params;
8
9
    /**
10
     * @param   array   $params
11
     */
12
    public function __construct($params)
13
    {
14
        $this->params = $params;
15
        $this->params['ownerPid'] = getmypid();
16
        $this->params['taskQueue'] = array(
17
            'className'         => '\Ackintosh\Snidel\Task\Queue',
18
            'constructorArgs'   => null,
19
        );
20
        $this->params['resultQueue'] = array(
21
            'className'         => '\Ackintosh\Snidel\Result\Queue',
22
            'constructorArgs'   => null,
23
        );
24
    }
25
26
    /**
27
     * @param   string  $name
28
     * @return  mixed
29
     */
30
    public function get($name)
31
    {
32
        return $this->params[$name];
33
    }
34
}
35