1 | <?php |
||
32 | class Version implements VersionInterface |
||
33 | { |
||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | private $id; |
||
38 | |||
39 | /** |
||
40 | * @var bool |
||
41 | */ |
||
42 | private $migrated; |
||
43 | |||
44 | /** |
||
45 | * @param $id string |
||
46 | * @param bool $migrated |
||
47 | * |
||
48 | * @throws InvalidArgumentException |
||
49 | */ |
||
50 | 78 | public function __construct($id, $migrated = false) |
|
59 | |||
60 | /** |
||
61 | * {@inheritDoc} |
||
62 | */ |
||
63 | 126 | final public function getId() |
|
67 | |||
68 | /** |
||
69 | * {@inheritDoc} |
||
70 | */ |
||
71 | 68 | final public function isMigrated() |
|
75 | |||
76 | /** |
||
77 | * {@inheritDoc} |
||
78 | */ |
||
79 | 35 | final public function setMigrated($migrated) |
|
83 | |||
84 | /** |
||
85 | * {@inheritDoc} |
||
86 | */ |
||
87 | 1 | final public function withMigration(MigrationInterface $migration) |
|
91 | |||
92 | /** |
||
93 | * Creates a list of versions based on specified IDs. |
||
94 | * |
||
95 | * @param mixed $versionIds |
||
96 | * |
||
97 | * @param bool $migrated |
||
98 | * @param null $migration |
||
99 | * @return Version\VersionInterface[] |
||
100 | */ |
||
101 | 15 | final public static function fromArray($versionIds, $migrated = false, $migration = null) |
|
114 | |||
115 | /** |
||
116 | * __toString |
||
117 | * @return string |
||
118 | */ |
||
119 | final public function __toString() |
||
123 | } |
||
124 |