Newer
Older
<?php
namespace Breyta;
interface ProgressInterface
{
/**
* Output information about starting the migration process
*
* Info contains:
* - `migrations` - an array of \stdClass containing the following info:
* - `file` - the file name (and unique identifier) of the migration
* - `status` - the current status of the migration (new, done or failed)
* - `executed` - UTC date time string when the migration was executed (only done and failed)
* - `executionTime` - the time it required to execute the migration (only done and failed)
* - `count` - an integer how many migrations are going to be executed
*
* @param \stdClass $info
*/
public function start(\stdClass $info);
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
* Output information about the $migration (before the migration)
*
* Migration contains:
* - `file` - the file name (and unique identifier) of the migration
* - `status` - the current status of the migration (new, done or failed)
*/
public function beforeMigration(\stdClass $migration);
/**
* Output information about the $statement (before it gets executed)
*
* Statement contains:
* - `teaser` - a brief text (without line breaks) that describes the query (e. g. CREATE TABLE migrations)
* - `action` - **optional** the database action to execute (e. g. create)
* - `type` - **optional** the type on which the action gets executed (e. g. table)
* - `name` - **optional** the name of the object (e. g. migrations)
*/
public function beforeExecution(\stdClass $statement);
/**
* Output information about the $statement (after it gets executed)
*
* Statement contains:
* - `teaser` - a brief text (without line breaks) that describes the query (e. g. CREATE TABLE migrations)
* - `action` - **optional** the database action to execute (e. g. create)
* - `type` - **optional** the type on which the action gets executed (e. g. table)
* - `name` - **optional** the name of the object (e. g. migrations)
* - `executionTime` - the time it required to execute the satement (in seconds)
*/
public function afterExecution(\stdClass $statement);
/**
* Output information about the $migration (after the migration)
*
* Migration contains:
* - `file` - the file name (and unique identifier) of the migration
* - `status` - the current status of the migration (new, done or failed)
* - `executionTime` - the time it required to execute the migration (in seconds)
* - `statements` - an array of statements that got executed
*/
public function afterMigration(\stdClass $migration);
/**
* Output information about what just happened
*
* Info contains:
* - `migrations` - an array of \stdClass containing the following info:
* - `file` - the file name (and unique identifier) of the migration
* - `status` - the current status of the migration (new, done or failed)
* - `executed` - UTC date time string when the migration was executed (only done and failed)
* - `executionTime` - the time it required to execute the migration (only done and failed)
* - `executed` - an array of migrations that just got executed
*/
public function finish(\stdClass $info);