1 | <?php |
||
23 | trait MigrateTrait |
||
24 | { |
||
25 | /** |
||
26 | * Migrated from. |
||
27 | * |
||
28 | * @var \BenatEspina\StackExchangeApiClient\Model\Interfaces\MigrationInfoInterface|null |
||
29 | */ |
||
30 | protected $migratedFrom; |
||
31 | |||
32 | /** |
||
33 | * Migrated to. |
||
34 | * |
||
35 | * @var \BenatEspina\StackExchangeApiClient\Model\Interfaces\MigrationInfoInterface|null |
||
36 | */ |
||
37 | protected $migratedTo; |
||
38 | |||
39 | /** |
||
40 | * Sets migrated from. |
||
41 | * |
||
42 | * @param \BenatEspina\StackExchangeApiClient\Model\Interfaces\MigrationInfoInterface|null $migratedFrom The |
||
|
|||
43 | * migration |
||
44 | * info |
||
45 | * |
||
46 | * @return $this self Object |
||
47 | */ |
||
48 | public function setMigratedFrom(MigrationInfoInterface $migratedFrom) |
||
54 | |||
55 | /** |
||
56 | * Gets migrated from. |
||
57 | * |
||
58 | * @return \BenatEspina\StackExchangeApiClient\Model\Interfaces\MigrationInfoInterface|null |
||
59 | */ |
||
60 | public function getMigratedFrom() |
||
64 | |||
65 | /** |
||
66 | * Sets migrated to. |
||
67 | * |
||
68 | * @param \BenatEspina\StackExchangeApiClient\Model\Interfaces\MigrationInfoInterface|null $migratedTo The |
||
69 | * migration |
||
70 | * info |
||
71 | * |
||
72 | * @return $this self Object |
||
73 | */ |
||
74 | public function setMigratedTo(MigrationInfoInterface $migratedTo) |
||
80 | |||
81 | /** |
||
82 | * Gets migrated to. |
||
83 | * |
||
84 | * @return \BenatEspina\StackExchangeApiClient\Model\Interfaces\MigrationInfoInterface|null |
||
85 | */ |
||
86 | public function getMigratedTo() |
||
90 | |||
91 | /** |
||
92 | * Loads the variables if the data exist into resource. It works like a constructor. |
||
93 | * |
||
94 | * @param null|mixed[] $resource The resource |
||
95 | */ |
||
96 | protected function loadMigration($resource) |
||
101 | } |
||
102 |