Completed
Push — master ( 348067...ae37c1 )
by Zach
03:29 queued 01:39
created

Migrator::resolveMigrationClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Yarak\Migrations;
4
5
use Yarak\Config\Config;
6
use Yarak\DB\ConnectionResolver;
7
use Yarak\Migrations\Repositories\MigrationRepository;
8
9
interface Migrator
10
{
11
    /**
12
     * Construct.
13
     *
14
     * @param Config              $config
15
     * @param ConnectionResolver  $resolver
16
     * @param MigrationRepository $repository
17
     */
18
    public function __construct(
19
        Config $config,
20
        ConnectionResolver $resolver,
21
        MigrationRepository $repository
22
    );
23
24
    /**
25
     * Run migrations.
26
     *
27
     * @return array
28
     */
29
    public function run();
30
31
    /**
32
     * Rollback migrations.
33
     *
34
     * @param int $steps
35
     *
36
     * @return array
37
     */
38
    public function rollback($steps = 1);
39
40
    /**
41
     * Reset the database by rolling back all migrations.
42
     *
43
     * @return array
44
     */
45
    public function reset();
46
47
    /**
48
     * Reset the database and run all migrations.
49
     *
50
     * @return array
51
     */
52
    public function refresh();
53
54
    /**
55
     * Set connection to database on object.
56
     *
57
     * @return Pdo
58
     */
59
    public function setConnection();
60
61
    /**
62
     * Return the connection.
63
     *
64
     * @return \Phalcon\Db\Adapter\Pdo
65
     */
66
    public function getConnection();
67
68
    /**
69
     * Return the object log.
70
     *
71
     * @return array
72
     */
73
    public function getLog();
74
}
75