1 | <?php |
||
14 | class Relations { |
||
15 | |||
16 | /** |
||
17 | * @var MslsOptions[] |
||
18 | */ |
||
19 | public $to_create = []; |
||
20 | |||
21 | /** |
||
22 | * @var MslsOptions[] |
||
23 | */ |
||
24 | protected $local_options = []; |
||
25 | |||
26 | /** |
||
27 | * @var ImportCoordinates |
||
28 | */ |
||
29 | protected $import_coordinates; |
||
30 | |||
31 | /** |
||
32 | * Relations constructor. |
||
33 | * |
||
34 | * @param ImportCoordinates $import_coordinates |
||
35 | */ |
||
36 | public function __construct( ImportCoordinates $import_coordinates ) { |
||
39 | |||
40 | /** |
||
41 | * Merges the data from a Relations object into this one. |
||
42 | * |
||
43 | * @param Relations|null $relations |
||
44 | */ |
||
45 | public function merge( Relations $relations = null ) { |
||
52 | |||
53 | /** |
||
54 | * @return array |
||
55 | */ |
||
56 | public function get_data() { |
||
59 | |||
60 | /** |
||
61 | * Creates the relations between the source blog elements and the destination one. |
||
62 | */ |
||
63 | public function create() { |
||
68 | |||
69 | protected function create_source_to_local() { |
||
81 | |||
82 | protected function create_local_to_source() { |
||
107 | |||
108 | /** |
||
109 | * Sets a relation that should be created. |
||
110 | * |
||
111 | * @param MslsOptions $creator |
||
112 | * @param string $dest_lang |
||
113 | * @param string $dest_post_id |
||
114 | */ |
||
115 | public function should_create( MslsOptions $creator, $dest_lang, $dest_post_id ) { |
||
118 | } |