Total Complexity | 8 |
Total Lines | 81 |
Duplicated Lines | 0 % |
Coverage | 31.58% |
Changes | 0 |
1 | <?php |
||
14 | class SchemaCreateTableEventArgs extends SchemaEventArgs |
||
15 | { |
||
16 | /** @var Table */ |
||
17 | private $table; |
||
18 | |||
19 | /** @var mixed[][] */ |
||
20 | private $columns; |
||
21 | |||
22 | /** @var mixed[] */ |
||
23 | private $options; |
||
24 | |||
25 | /** @var AbstractPlatform */ |
||
26 | private $platform; |
||
27 | |||
28 | /** @var string[] */ |
||
29 | private $sql = []; |
||
30 | |||
31 | /** |
||
32 | * @param mixed[][] $columns |
||
33 | * @param mixed[] $options |
||
34 | */ |
||
35 | 486 | public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform) |
|
36 | { |
||
37 | 486 | $this->table = $table; |
|
38 | 486 | $this->columns = $columns; |
|
39 | 486 | $this->options = $options; |
|
40 | 486 | $this->platform = $platform; |
|
41 | 486 | } |
|
42 | |||
43 | /** |
||
44 | * @return Table |
||
45 | */ |
||
46 | public function getTable() |
||
47 | { |
||
48 | return $this->table; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return mixed[][] |
||
53 | */ |
||
54 | public function getColumns() |
||
55 | { |
||
56 | return $this->columns; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @return mixed[] |
||
61 | */ |
||
62 | public function getOptions() |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * @return AbstractPlatform |
||
69 | */ |
||
70 | public function getPlatform() |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead. |
||
77 | * |
||
78 | * @param string|string[] $sql |
||
79 | * |
||
80 | * @return \Doctrine\DBAL\Event\SchemaCreateTableEventArgs |
||
81 | */ |
||
82 | public function addSql($sql) |
||
83 | { |
||
84 | $this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args()); |
||
85 | |||
86 | return $this; |
||
87 | } |
||
88 | |||
89 | /** |
||
90 | * @return string[] |
||
91 | */ |
||
92 | public function getSql() |
||
95 | } |
||
96 | } |
||
97 |