1 | <?php |
||
34 | class AlterTable |
||
35 | { |
||
36 | /** |
||
37 | * The table |
||
38 | * |
||
39 | * @var \Phinx\Db\Table\Table |
||
40 | */ |
||
41 | protected $table; |
||
42 | |||
43 | /** |
||
44 | * The listo of actions to execute |
||
45 | * |
||
46 | * @var \Phinx\Db\Action\Action[] |
||
47 | */ |
||
48 | protected $actions = []; |
||
49 | |||
50 | /** |
||
51 | * Constructor |
||
52 | * |
||
53 | * @param Table $table The table to change |
||
54 | */ |
||
55 | public function __construct(Table $table) |
||
59 | |||
60 | /** |
||
61 | * Adds another action to the collection |
||
62 | * |
||
63 | * @param Action $action The action to add |
||
64 | * @return void |
||
65 | */ |
||
66 | public function addAction(Action $action) |
||
70 | |||
71 | /** |
||
72 | * Returns the table associated to this collection |
||
73 | * |
||
74 | * @return Table |
||
75 | */ |
||
76 | public function getTable() |
||
80 | |||
81 | /** |
||
82 | * Returns an array with all collected actions |
||
83 | * |
||
84 | * @return Action[] |
||
85 | */ |
||
86 | public function getActions() |
||
90 | } |
||
91 |