TableCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Spiral, Core Components
4
 *
5
 * @author Wolfy-J
6
 */
7
8
namespace Spiral\ORM\Commands;
9
10
use Spiral\Database\Entities\Table;
11
use Spiral\ORM\SQLCommandInterface;
12
13
class TableCommand extends AbstractCommand implements SQLCommandInterface
14
{
15
    /**
16
     * Table to be updated.
17
     *
18
     * @var Table
19
     */
20
    protected $table;
21
22
    /**
23
     * @param Table $table
24
     */
25
    public function __construct(Table $table)
26
    {
27
        $this->table = $table;
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function getDriver()
34
    {
35
        return $this->table->getDatabase()->getDriver();
36
    }
37
}