Completed
Push — master ( 96ea8b...1276b9 )
by Alexis
08:08
created

ContainerAwareCommand::getContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the awurth/silex-user package.
5
 *
6
 * (c) Alexis Wurth <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace AWurth\Silex\User\Command;
13
14
use Pimple\Container;
15
use Symfony\Component\Console\Command\Command;
16
17
/**
18
 * Command.
19
 *
20
 * @author Alexis Wurth <[email protected]>
21
 */
22
abstract class ContainerAwareCommand extends Command
23
{
24
    /**
25
     * @var Container
26
     */
27
    protected $container;
28
29
    /**
30
     * Constructor.
31
     *
32
     * @param Container $container
33
     * @param string|null        $name
34
     */
35
    public function __construct(Container $container, $name = null)
36
    {
37
        parent::__construct($name);
38
39
        $this->container = $container;
40
    }
41
42
    /**
43
     * Gets the container.
44
     *
45
     * @return Container
46
     */
47
    public function getContainer()
48
    {
49
        return $this->container;
50
    }
51
52
    /**
53
     * Sets the container.
54
     *
55
     * @param Container $container
56
     */
57
    public function setContainer(Container $container)
58
    {
59
        $this->container = $container;
60
    }
61
}
62