Completed
Push — master ( 579af5...b29473 )
by Oleg
07:53
created

Command::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php /** MicroCommand */
2
3
namespace Micro\Base;
4
5
/**
6
 * Command class file.
7
 *
8
 * @author Oleg Lunegov <[email protected]>
9
 * @link https://github.com/lugnsk/micro
10
 * @copyright Copyright &copy; 2013 Oleg Lunegov
11
 * @license /LICENSE
12
 * @package Micro
13
 * @subpackage Base
14
 * @version 1.0
15
 * @since 1.0
16
 * @abstract
17
 */
18
abstract class Command implements ICommand
19
{
20
    /** @var array $args arguments for command */
21
    public $args = [];
22
    /** @var bool $result status of execute command */
23
    public $result = false;
24
    /** @var string $message status message of execute command */
25
    public $message = '';
26
    /** @var IContainer $container Container config */
27
    protected $container;
28
29
30
    /**
31
     * Set arguments class
32
     *
33
     * @access public
34
     *
35
     * @param array $params configuration array
36
     *
37
     * @result void
38
     */
39
    public function __construct(array $params)
40
    {
41
        $this->container = $params['container'];
42
43
        unset($params['container']);
44
45
        $this->args = $params;
46
    }
47
}
48